I'm using a ScrollContainer to display an image that I want the user to be able to pan and zoom. I was planning to map zoom to the mouse wheel but currently it seems as though I can't stop it from scrolling the container. I thought setting the interaction mode to touch only would do this but it appears that isn't enough. Any insight?
ScrollContainer: Can I ignore mouse wheel input?(2 posts) (1 voice)
Alright, two solutions I was able to find depending on how gross you want your code to end up looking.
Simple solution: Set the ScrollContainer's "verticalMouseWheelScrollStep" property to 0, this stops the scrolling behavior but if you are in the middle of dragging it will also cause the drag event to end;
Slightly less simple solution: Create a new class that extends ScrollContainer and override the protected function nativeStage_mouseWheelHandler leaving it empty.
If there are any better solutions out there I'd like to hear them. Thanks
You must log in to post.