Closed cancech closed 8 months ago
I've worked around this by creating an eventlistener in the window on keydown and keyup in the javascript directly, and when those events fire, you can enable or disable panning depending on the event. In my case, I decided to go back and call .net code so I can disable/enable with the BlazorPanzoom library, but you should be able to enable/disable it directly from javascript as well. It's a workaround, but it seems to work well. But I do agree with you ultimately, this feature would be nice to add to keep as much inside Blazor as possible.
Ok, thanks for the information!
For zooming there is the capability to block zooming from taking place via
OnWheel
(i.e.: in the demos, block scroll unless Shift is pressed). Is there something comparable for panning? Playing around with the pan, it would appear that any mouse click+drag will cause panning, but I'd like to limit this to just specific occasions, such as:OnWheel
)Looking through the examples I'm not seeing anything which would allow for this type of control. If something of the sort is available, could you point me in that direction? Or thoughts on how something like this could be implemented?
Thanks!