Pinch Zoom and touch rotate not working on linux using java sdk

1163
15
Jump to solution
11-27-2023 06:54 AM
ZabihMalik
New Contributor II
 
0 Kudos
15 Replies
ZabihMalik
New Contributor II

I have tested above code, javafx is not getting any zoom event, even touch event is also acting as mouse event. Like if you drag the mAp, event is mouse dragged instead of touch dragged.

0 Kudos
MarkBaird
Esri Regular Contributor

@ZabihMalik thanks for confirming this.

I'm currently putting together a reproducer showing the issue which I can show to someone from the JavaFX open source team.  My reproducer uses just a JavaFX ImageView control - I've stripped this back to pure JavaFX.

The objective of JavaFX is that you can write code for Windows, Linux and Mac and expect very similar results.  There will be some platform differences, but something like mouse and touch interactions I believe should be similar.

My experiences of JavaFX over the years has been pretty good; there were some releases recently to address app focus issues with macOS Sonoma but they were quickly addressed.  

I'll share my test app but so far I'm seeing that RotateEvent and ZoomEvent work as follows:

 - Windows touch screen - all fine

 - macOS touch pad - all fine

 - Linux Ubuntu - no events fired

Let's see what we find out...  you need to appreciate that if this turns out to be a JavaFX bug I'm limited in what can be done to resolve this - you may need to push for them to fix it.

I'll report back when I have more info.

0 Kudos
MarkBaird
Esri Regular Contributor

This is the reproducer app I've created which uses only JavaFX controls.  

If you clone it you hopefully should experience the same as I have.

0 Kudos
MarkBaird
Esri Regular Contributor

@ZabihMalik 

I have raised this as a bug in JavaFX and it has just been accepted https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8321291

They have managed to reproduce the bug on every version of JavaFX on Ubuntu and in the comments they are asking if it was ever implemented.  Let's see what happens.  Please note that this isn't something I can control.

In the meantime I'm aware you need to deliver a project where you are limited to single touch events.  For zooming and panning had you considered having buttons to perform these operations?

ZabihMalik
New Contributor II

Thanks Marks.

I am thinking on adding button, but it will increase the steps to zoom to particular place, and also not very much optimised for SceneView as mostly our project is based on 3D SceneView. 

0 Kudos
MarkBaird
Esri Regular Contributor

@ZabihMalik I've sent you a PM about this

0 Kudos