How to get a mouse wheel event listener on the Forma canvas?

How to get a mouse wheel event listener on the Forma canvas?

iklimis
Advocate Advocate
278 Views
1 Reply
Message 1 of 2

How to get a mouse wheel event listener on the Forma canvas?

iklimis
Advocate
Advocate


Hello Forma team, 

 

In our extension we provide geographical images as a terrain in a Forma project.
However the need arose where the image must be of higher resolution as the user zooms in a specific area.


This feature therefore could be implemented if through our extension we could listen to a mouse wheel event and update the appropriate texture in our canvas, but this is not yet possible since we are in an iframe and cannot listen to mouse events outside it.

It would be helpful if we could listen to forma main window DOM events like wheel event and have a communication between the window and the extension in order for this crucial upgrade feature to be achieved.


Thanks in advance

0 Likes
279 Views
1 Reply
Reply (1)
Message 2 of 2

md_amjad_hossain
Autodesk
Autodesk

Hei, @iklimis, Thanks for your question. As, you figured, right now, we don't have any support for the mouse wheel event. But, I don't believe thats the right way though. I believe the `CameraAPI` would be much better way to look into this. But, I am sorry that will also not give you the zoom/current terrain coordinates. But, thanks for your suggestion, we will look into the problem and see if we can prioritise the problem to work on. Thanks 



Md Amjad Hossain
Software Development Engineer
0 Likes