Adding image modifiers events

Adding events to allow plugins to listen for image modifiers loaded and refreshed events respectively.
This commit is contained in:
patriceac 2022-12-26 12:16:36 -08:00
parent e241ef25e5
commit 48a3254ad2

View File

@ -104,6 +104,7 @@ function createModifierGroup(modifierGroup, initiallyExpanded) {
} }
refreshTagsList() refreshTagsList()
document.dispatchEvent(new Event('refreshImageModifiers'))
}) })
} }
}) })
@ -146,6 +147,7 @@ async function loadModifiers() {
} }
loadCustomModifiers() loadCustomModifiers()
document.dispatchEvent(new Event('loadImageModifiers'))
} }
function refreshModifiersState(newTags) { function refreshModifiersState(newTags) {
@ -227,6 +229,7 @@ function refreshTagsList() {
activeTags.splice(idx, 1) activeTags.splice(idx, 1)
refreshTagsList() refreshTagsList()
} }
document.dispatchEvent(new Event('refreshImageModifiers'))
}) })
}) })