score:0

To ensure the mouse events are caught correctly by d3, you need to modify your zoom variable like so:

var zoom = d3.behavior.zoom()
           .on('zoom', zoomed,false)
           .on('zoomstart', function() {
               if (d3.event.sourceEvent.type != 'mousewheel') {
                   $('#drawing').css('pointer-events', 'none');
               }
            })
           .on('zoomend', function() {
               if (d3.event.sourceEvent != null) {
                   $('#drawing').css('pointer-events', 'all');
               }
            });

This ensures all pan events are detected.

For other possible solutions to your issue, see this stack question.


Related Query