You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to implement the following functionality: zoom viewport on Ctrl+mouseWheel, and drag viewport on just mouseWheel.
My first implementation was listening Ctrl on window, and pause/resume Wheel and Drag plugins
// for ctrl keydown()=>{viewport.resume("wheel");}// for ctrl keyup()=>{viewport.pause("wheel");}
And this solution works, except one case -- when window is not focused, in that case keyup and keydown events just do not fire.
And I was wondering if it is possible to use event.ctrlKey property to determine if viewport should zoom or drag. It is possible to change code of checkKeyPress function in Wheel plugin to make it work the way I want. But there is still a problem, when Wheel plugin is applied, Drag plugin just can not drag viewport anymore. So maybe that is possible to change this condition to allow drag plugin do it's thing when, for example, Wheel plugin does not handle wheel event?
The text was updated successfully, but these errors were encountered:
I want to implement the following functionality: zoom viewport on
Ctrl+mouseWheel
, and drag viewport on justmouseWheel
.My first implementation was listening
Ctrl
on window, and pause/resume Wheel and Drag pluginsAnd this solution works, except one case -- when window is not focused, in that case
keyup
andkeydown
events just do not fire.And I was wondering if it is possible to use
event.ctrlKey
property to determine if viewport should zoom or drag. It is possible to change code ofcheckKeyPress
function inWheel
plugin to make it work the way I want. But there is still a problem, whenWheel
plugin is applied,Drag
plugin just can not drag viewport anymore. So maybe that is possible to change this condition to allow drag plugin do it's thing when, for example,Wheel
plugin does not handlewheel
event?The text was updated successfully, but these errors were encountered: