I have an application that requires zoom inside a ScrollPane, but with my current approach I\'m still facing 2 challenges. In order to replicate the problem, I have written
The following workaround seems to be giving better results:
Add a opaque rectangle which covers the whole screen, so that you don't miss the scroll event. Apparently you can miss scroll event if you don't hit a shape.
Rectangle opaque = new Rectangle(0,0,WINDOW_WIDTH,WINDOW_HEIGHT);
opaque.setOpacity( 0 );
outerGroup.getChildren().add( opaque );
outerGroup.setOnScroll(new ZoomHandler(innerGroup));