Toggle image modifiers plugin (#558)

* Toggle image modifiers plugin

Right-click on image modifiers to temporarily turn them off without removing them. To quickly iterate and experiment with various combinations.

Please note this plugin required a minor tweak in getPrompts() to add support for image modifier inactive state.

* Fix tag matching

Co-authored-by: cmdr2 <secondary.cmdr2@gmail.com>
This commit is contained in:
patriceac
2022-12-01 01:40:36 -08:00
committed by GitHub
parent c9a0d090cb
commit ca9413ccf4
3 changed files with 57 additions and 3 deletions

View File

@ -219,7 +219,7 @@ function refreshTagsList() {
editorModifierTagsList.appendChild(tag.element)
tag.element.addEventListener('click', () => {
let idx = activeTags.indexOf(tag)
let idx = activeTags.findIndex(o => { return o.name === tag.name })
if (idx !== -1) {
toggleCardState(activeTags[idx].name, false)