All examples By author By category About

phil-pedruco

Disable zoom on scrollwheel but retain the ability to pan #1

This is a follow up to this stack overflow question that aimed to restrict the scrollwheel zoom ability when using zoom behaviour. Two answers were proposed and this bl.ock here together with this bl.ock demonstrate these answers. The answer by Lars Kotthoff was be far the more elegant and the I'd recommend to use rather than my solution but both achieve the same thing. However, there was a comment that the performance of the second solution was laggy, I thought I'd create a demonstration.

This answer uses translate operator but ignores the zoom, as I said an elegant way to address the problem.