Tweak modifiers help msg

This commit is contained in:
cmdr2 2022-11-30 16:32:43 +05:30
parent ee66c799e0
commit 1949d8a50c
2 changed files with 4 additions and 3 deletions

View File

@ -86,7 +86,7 @@
</div>
<div id="editor-inputs-tags-container" class="row">
<label>Image Modifiers: <small>(click an Image Modifier to remove it, use Ctrl+Mouse Wheel to adjust its weight)</small></label>
<label>Image Modifiers <i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip right">click an Image Modifier to remove it, use Ctrl+Mouse Wheel to adjust its weight</span></i>:</label>
<div id="editor-inputs-tags-list"></div>
</div>

View File

@ -85,11 +85,12 @@ function createModifierGroup(modifierGroup, initiallyExpanded) {
if(typeof modifierCard == 'object') {
modifiersEl.appendChild(modifierCard)
const trimmedName = trimModifiers(modifierName)
modifierCard.addEventListener('click', () => {
if (activeTags.map(x => trimModifiers(x.name)).includes(trimModifiers(modifierName))) {
if (activeTags.map(x => trimModifiers(x.name)).includes(trimmedName)) {
// remove modifier from active array
activeTags = activeTags.filter(x => trimModifiers(x.name) != trimModifiers(modifierName))
activeTags = activeTags.filter(x => trimModifiers(x.name) != trimmedName)
toggleCardState(modifierCard, false)
} else {
// add modifier to active array