I tried to use the hypeGestureXPosition event even when the users Zoom upon a symbol !
To do that, I need to know what is the current scale factor applied on the window …
How can I collect this information in order to be able to make my coordinate transformation ?
I’m not right sure of what you are trying to achieve.
the bouton has arange from zero to 180 degrees and the brownie turns 360 dergree? I scaled the window and got the same result …
… but had the impression that the approach you took is much to complicated.
my attached example should be draggable in the visual range.
if it does not solve your problem, please explain further
Thank you for your help ! But it doesn’t solve my pb !-)
If you keep your file xxx.hype as an example :
It works fine if you let the screen at it’s initial size => the button rotate correctly the symbol’s wing
But if you zoom in the screen, with the trackpad, it becomes impossible to turn smoothly the button !
I understood it’s because the hypeGesturePosition events still give the coordinates in the initial size and don’t take into account the scale factor applied …
So, if the scene scaling by the trackpad is allowed, it is necessary to make a coordinate transposition of the gesture and to do that, I’m looking for a way to determine the current scaling factor ?
(I’m not sure to be clear, you would apologize my approximative english !-)
hypes gestureCoordinates can not be changed. so you’ve got to get getBoundingClientRects return to the same coordinatespace … please have a look if it fits your needs.