anvaka / panzoom

Universal pan and zoom library (DOM, SVG, Custom)
https://anvaka.github.io/panzoom/demo/attach-via-script.html
MIT License
1.83k stars 293 forks source link

Override onDoubleClick to call internal method #305

Open JokerMartini opened 1 year ago

JokerMartini commented 1 year ago

How can i call an internal method of the instance when overriding the 'onDoubleClick' event?

 panZoomObj = panzoom(this.sceneEl, {
          smoothScroll: false,
          zoomDoubleClickSpeed: 1,
          onDoubleClick: function(e) {
            panZoomObj.moveTo(0, 0);
            panZoomObj.zoomAbs(0, 0, 1);
            return false;
          }
      });