From 65b90f76b84d43c53ad98e5aa298077ffe407b78 Mon Sep 17 00:00:00 2001 From: Lurkars Date: Wed, 4 Oct 2023 20:04:12 +0200 Subject: [PATCH] fix overlaying element on character card --- package-lock.json | 4 ++-- package.json | 2 +- src/app/ui/figures/attackmodifier/attackmodifier-draw.ts | 6 +++++- src/app/ui/figures/character/character.html | 5 +++-- src/app/ui/figures/character/character.scss | 5 +++++ src/app/ui/figures/character/character.ts | 1 + 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8d095d7a6..20676a560 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gloomhavensecretariat", - "version": "0.77.13", + "version": "0.77.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "gloomhavensecretariat", - "version": "0.77.13", + "version": "0.77.14", "license": "AGPL3", "dependencies": { "@angular/animations": "^16.2.7", diff --git a/package.json b/package.json index 04cdaac6e..0d8144767 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gloomhavensecretariat", - "version": "0.77.13", + "version": "0.77.14", "license": "AGPL3", "description": "Gloomhaven Secretariat is a Gloomhaven Companion app.", "homepage": "https://gloomhaven-secretariat.de", diff --git a/src/app/ui/figures/attackmodifier/attackmodifier-draw.ts b/src/app/ui/figures/attackmodifier/attackmodifier-draw.ts index f4162b908..442349fb5 100644 --- a/src/app/ui/figures/attackmodifier/attackmodifier-draw.ts +++ b/src/app/ui/figures/attackmodifier/attackmodifier-draw.ts @@ -1,4 +1,4 @@ -import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'; +import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; import { gameManager, GameManager } from 'src/app/game/businesslogic/GameManager'; import { SettingsManager, settingsManager } from 'src/app/game/businesslogic/SettingsManager'; import { AttackModifierDeck, AttackModifierType } from 'src/app/game/model/data/AttackModifier'; @@ -14,6 +14,7 @@ import { Subscription } from 'rxjs'; export class AttackModifierDrawComponent implements OnInit, OnDestroy, OnChanges { @Input('character') character!: Character; + @Output('drawing') drawingEmitter: EventEmitter = new EventEmitter(); @Input() initTimeout: number = 1500; gameManager: GameManager = gameManager; @@ -96,15 +97,18 @@ export class AttackModifierDrawComponent implements OnInit, OnDestroy, OnChanges } this.queue = 0; this.drawing = false; + this.drawingEmitter.emit(false); this.current = this.deck.current; } } drawQueue() { this.drawing = true; + this.drawingEmitter.emit(true); this.element.nativeElement.getElementsByClassName('attack-modifier-draw')[0].classList.add('drawing'); this.queueTimeout = setTimeout(() => { this.drawing = false; + this.drawingEmitter.emit(false); this.queueTimeout = null; if (this.queue > 0) { this.queue--; diff --git a/src/app/ui/figures/character/character.html b/src/app/ui/figures/character/character.html index f43018fcd..198a49f06 100644 --- a/src/app/ui/figures/character/character.html +++ b/src/app/ui/figures/character/character.html @@ -161,9 +161,10 @@ - - +