Use of toggleClass

This commit is contained in:
Vlyan
2021-01-19 20:18:15 +01:00
parent 71a3af85dd
commit 8fbf7f9005
4 changed files with 6 additions and 4 deletions

View File

@@ -11,7 +11,9 @@
- Spanish real translation by Alejabar (thanks !)
- Added a GM Dialog Tool for setting global difficulty (TN) value / hidden (with DicePicker live refresh)
- Compendium now display Ring and Rank if any in list view
- DicePicker : Fixed the initial display of "use a void point"
- DicePicker :
- Fixed the initial display of "use a void point"
- No free void point anymore
- PC/NPC Sheet :
- Added a visual indicator for equipped / readied
- Now only equipped armor / weapon will show in conflict tab, and all armors/weapons now show in inventory tab

View File

@@ -159,7 +159,7 @@ export class BaseSheetL5r5e extends ActorSheet {
event.stopPropagation();
const elmt = $(event.currentTarget).data("toggle");
const tgt = html.find("." + elmt);
tgt.hasClass("toggle-active") ? tgt.removeClass("toggle-active") : tgt.addClass("toggle-active");
tgt.toggleClass("toggle-active");
});
// *** Everything below here is only needed if the sheet is editable ***

View File

@@ -165,7 +165,7 @@ export class TwentyQuestionsDialog extends FormApplication {
event.stopPropagation();
const elmt = $(event.currentTarget).data("toggle");
const tgt = html.find("." + elmt);
tgt.hasClass("toggle-active") ? tgt.removeClass("toggle-active") : tgt.addClass("toggle-active");
tgt.toggleClass("toggle-active");
});
// BT Next

View File

@@ -89,7 +89,7 @@ export class ItemSheetL5r5e extends ItemSheet {
event.stopPropagation();
const elmt = $(event.currentTarget).data("toggle");
const tgt = html.find("." + elmt);
tgt.hasClass("toggle-active") ? tgt.removeClass("toggle-active") : tgt.addClass("toggle-active");
tgt.toggleClass("toggle-active");
});
// Everything below here is only needed if the sheet is editable