From 2c7d5adb80dd1fadc2c6c0046e80fd0ec2117f89 Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Tue, 27 Dec 2022 02:58:46 -0800 Subject: [PATCH] Adding image modifier events to core plugins Sorry, forgot these in the first PR. --- ui/plugins/ui/Modifiers-dnd.plugin.js | 1 + ui/plugins/ui/Modifiers-wheel.plugin.js | 1 + ui/plugins/ui/modifiers-toggle.plugin.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/plugins/ui/Modifiers-dnd.plugin.js b/ui/plugins/ui/Modifiers-dnd.plugin.js index 90c3ce85..b0aaaa95 100644 --- a/ui/plugins/ui/Modifiers-dnd.plugin.js +++ b/ui/plugins/ui/Modifiers-dnd.plugin.js @@ -74,6 +74,7 @@ // update activeTags const tag = activeTags.splice(currentPos, 1) activeTags.splice(droppedPos, 0, tag[0]) + document.dispatchEvent(new Event('refreshImageModifiers')) } } }; diff --git a/ui/plugins/ui/Modifiers-wheel.plugin.js b/ui/plugins/ui/Modifiers-wheel.plugin.js index a50ad693..6639873d 100644 --- a/ui/plugins/ui/Modifiers-wheel.plugin.js +++ b/ui/plugins/ui/Modifiers-wheel.plugin.js @@ -58,6 +58,7 @@ break } } + document.dispatchEvent(new Event('refreshImageModifiers')) } } }) diff --git a/ui/plugins/ui/modifiers-toggle.plugin.js b/ui/plugins/ui/modifiers-toggle.plugin.js index 20875b5f..cf0fedc8 100644 --- a/ui/plugins/ui/modifiers-toggle.plugin.js +++ b/ui/plugins/ui/modifiers-toggle.plugin.js @@ -46,7 +46,7 @@ return obj; }); - console.log(activeTags) + document.dispatchEvent(new Event('refreshImageModifiers')) } }) }