From 7a3cb322dc3b5019d1c9f2a13b0a20e06ea85953 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Fri, 2 Feb 2024 17:06:28 -0500 Subject: [PATCH] :fire: remove unused code --- .../javascript/active_units.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/extensions-builtin/sd_forge_controlnet/javascript/active_units.js b/extensions-builtin/sd_forge_controlnet/javascript/active_units.js index ef7574cd..9e3a9e72 100644 --- a/extensions-builtin/sd_forge_controlnet/javascript/active_units.js +++ b/extensions-builtin/sd_forge_controlnet/javascript/active_units.js @@ -86,7 +86,6 @@ this.attachEnabledButtonListener(); this.attachControlTypeRadioListener(); - // this.attachTabNavChangeObserver(); this.attachImageUploadListener(); this.attachImageStateChangeObserver(); this.attachA1111SendInfoObserver(); @@ -186,22 +185,6 @@ } } - /** - * Each time the active tab change, all tab nav buttons are cleared and - * regenerated by gradio. So we need to reapply the active states on - * them. - */ - attachTabNavChangeObserver() { - new MutationObserver((mutationsList) => { - for (const mutation of mutationsList) { - if (mutation.type === 'childList') { - this.updateActiveState(); - this.updateActiveControlType(); - } - } - }).observe(this.tabNav, { childList: true }); - } - attachImageUploadListener() { // Automatically check `enable` checkbox when image is uploaded. this.inputImage.addEventListener('change', (event) => {