code: function onWheel(event) {
      var prevScale = scale,
  
          offset = container.offset(),
          mouseX = event.pageX - offset.left,
          mouseY = event.pageY - offset.top,
          factor = 0;
  
      scale += event.deltaY * SCALE_TUNER;
      if(scale < MIN_SCALE) {
        scale = MIN_SCALE;
      }
      else if(scale > MAX_SCALE) {
        scale = MAX_SCALE;
      }
  
      factor = 1 - scale / prevScale;
      panX += (mouseX - panX) * factor;
      panY += (mouseY - panY) * factor;
  
      transform();
      scheduleVisibilityCheck();
  
      _tip.reposition();
      event.preventDefault();
    }
docs: Set zoom values, pan also would change as we are zooming with mouse position as pivote.