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