From a08eff391e01be82d611201c4037b48987e45161 Mon Sep 17 00:00:00 2001 From: Danil Boldyrev Date: Thu, 1 Feb 2024 12:13:25 +0300 Subject: [PATCH] Temporary fix that returns functionality when sending via buttons --- .../canvas-zoom-and-pan/javascript/zoom.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js b/extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js index 3b20f1a8f..cf4a9ce61 100644 --- a/extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js +++ b/extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js @@ -945,6 +945,28 @@ onUiLoaded(async() => { window.applyZoomAndPanIntegration = applyZoomAndPanIntegration; // for any extension + + const img2imgArean = document.querySelector("#img2img_settings") + img2imgArean.addEventListener("mousemove",(e) => { + const tabId = getTabId(elements) + + + // Check for tooltip + if (tabId == "#img2img_sketch" ||tabId == "#inpaint_sketch" || tabId == "#img2maskimg" ) { + const zoomTooltip = document.querySelector(`${tabId} .canvas-tooltip`) + + // If tooltip removed we again add zoom functionality + if(!zoomTooltip) { + console.log("added") + applyZoomAndPan(tabId,false) + } else { + console.log("Not added") + } + + } + + + }) /* The function `applyZoomAndPanIntegration` takes two arguments: