mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Minor tweaks to effect attributes (#1408)
* Minor tweaks to effect attributes * Fix removing
This commit is contained in:
parent
00e9436fe0
commit
f4dd9dc5c1
2 changed files with 4 additions and 3 deletions
|
|
@ -87,7 +87,7 @@ export default class DhEffectsDisplay extends HandlebarsApplicationMixin(Applica
|
|||
async removeEffect(event) {
|
||||
const element = event.target.closest('.effect-container');
|
||||
const effects = DhEffectsDisplay.getTokenEffects();
|
||||
const effect = effects.find(x => x.id === element.id);
|
||||
const effect = effects.find(x => x.id === element.dataset.effectId);
|
||||
await effect.delete();
|
||||
this.render();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<div>
|
||||
<div class="effects-display-container">
|
||||
{{#each effects as | effect |}}
|
||||
<span class="effect-container {{#if effect.condition}}disabled{{/if}}" data-tooltip="#effect-display#" id="{{effect.id}}"
|
||||
data-applied-by="{{effect.appliedBy}}" {{#if effect.condition}}data-condition="{{effect.condition}}"{{else}}data-uuid="{{effect.uuid}}"{{/if}}
|
||||
<span class="effect-container {{#if effect.condition}}disabled{{/if}}" data-tooltip="#effect-display#" data-effect-id="{{effect.id}}"
|
||||
{{#if effect.appliedBy}}data-applied-by="{{effect.appliedBy}}"{{/if}}
|
||||
{{#if effect.condition}}data-condition="{{effect.condition}}"{{else}}data-uuid="{{effect.uuid}}"{{/if}}
|
||||
>
|
||||
<a {{#if effect.condition}}disabled{{/if}}>
|
||||
<img src="{{effect.img}}" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue