From 48a3254ad2710daa652aeaf704e7ab083705541e Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Mon, 26 Dec 2022 12:16:36 -0800 Subject: [PATCH] Adding image modifiers events Adding events to allow plugins to listen for image modifiers loaded and refreshed events respectively. --- ui/media/js/image-modifiers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/media/js/image-modifiers.js b/ui/media/js/image-modifiers.js index 8f2088ad..8927a3d6 100644 --- a/ui/media/js/image-modifiers.js +++ b/ui/media/js/image-modifiers.js @@ -104,6 +104,7 @@ function createModifierGroup(modifierGroup, initiallyExpanded) { } refreshTagsList() + document.dispatchEvent(new Event('refreshImageModifiers')) }) } }) @@ -146,6 +147,7 @@ async function loadModifiers() { } loadCustomModifiers() + document.dispatchEvent(new Event('loadImageModifiers')) } function refreshModifiersState(newTags) { @@ -227,6 +229,7 @@ function refreshTagsList() { activeTags.splice(idx, 1) refreshTagsList() } + document.dispatchEvent(new Event('refreshImageModifiers')) }) })