-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
8u25, 8u40
Prerequisites: Seperate Camera on a SubScene:
The MouseEvents report always the same values even if the camera translates and shows a different part of the scene. Minimal Code:
@Override
public void start(Stage primaryStage) throws Exception{
Pane rootOne = new Pane();
rootOne.getChildren().add(new Circle(30, Color.RED));
SubScene subScene = new SubScene(rootOne, 300, 270);
Group root = new Group(subScene);
Scene scene = new Scene(root, 300, 275);
final Camera camera = new ParallelCamera();
subScene.setCamera(camera);
scene.setOnMousePressed(event -> {
System.out.println(event.getX() + " " + event.getSceneX() + " " + event.getScreenX());
camera.setTranslateX(camera.getTranslateX() - 30);
});
primaryStage.setScene(scene);
primaryStage.show();
}
Stay with the mouse on the same spot and click. The Camera translates, and with it the objects but the MouseEvent reports the same coordinates on every field.
The MouseEvents report always the same values even if the camera translates and shows a different part of the scene. Minimal Code:
@Override
public void start(Stage primaryStage) throws Exception{
Pane rootOne = new Pane();
rootOne.getChildren().add(new Circle(30, Color.RED));
SubScene subScene = new SubScene(rootOne, 300, 270);
Group root = new Group(subScene);
Scene scene = new Scene(root, 300, 275);
final Camera camera = new ParallelCamera();
subScene.setCamera(camera);
scene.setOnMousePressed(event -> {
System.out.println(event.getX() + " " + event.getSceneX() + " " + event.getScreenX());
camera.setTranslateX(camera.getTranslateX() - 30);
});
primaryStage.setScene(scene);
primaryStage.show();
}
Stay with the mouse on the same spot and click. The Camera translates, and with it the objects but the MouseEvent reports the same coordinates on every field.