Prevent Marquee tool to be more than the MaxZoomLevel

Hi is there a way to prevent the Marquee toold zoom to be able to zoom more than the value that Im setting for setMaxZoomLevel in this 8

Hello, just to provide you with the correct information, what product is this for (ie. WebViewer, Apryse Mobile SDK)?

Hi thanks for the reply my question is in the WebViewer

Hello ignacio.castro,

Thank you for reaching out, you could implement this via:

const { Tools } = instance.Core;
const marqueeLeftUp = Tools.MarqueeZoomTool.prototype.mouseLeftUp;
Tools.MarqueeZoomTool.prototype.mouseLeftUp = function() {
  marqueeLeftUp.apply(this, arguments);
  const page = instance.Core.documentViewer.getCurrentPage();
  if(instance.UI.getZoomLevel() > 8) {
    instance.UI.setZoomLevel(8);
    instance.Core.documentViewer.setCurrentPage(page);
  }
};

Best regards,
Tyler