mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +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) {
|
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,8 +1,9 @@
|
||||||
<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#" id="{{effect.id}}"
|
<span class="effect-container {{#if effect.condition}}disabled{{/if}}" data-tooltip="#effect-display#" data-effect-id="{{effect.id}}"
|
||||||
data-applied-by="{{effect.appliedBy}}" {{#if effect.condition}}data-condition="{{effect.condition}}"{{else}}data-uuid="{{effect.uuid}}"{{/if}}
|
{{#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}}>
|
<a {{#if effect.condition}}disabled{{/if}}>
|
||||||
<img src="{{effect.img}}" />
|
<img src="{{effect.img}}" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue