mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Better state handling for buttons, etc.
This commit is contained in:
parent
8978721e63
commit
6e70f14ca7
2 changed files with 24 additions and 41 deletions
|
|
@ -95,6 +95,8 @@ export default class DhTemplateManager {
|
|||
canvas.stage.off('mousedown', mousedown);
|
||||
canvas.app.view.removeEventListener('contextmenu', contextmenu);
|
||||
canvas.app.view.removeEventListener('wheel', wheel);
|
||||
|
||||
this.#activePreview = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -103,9 +105,9 @@ export default class DhTemplateManager {
|
|||
*/
|
||||
#confirmTemplate(event) {
|
||||
event.stopPropagation();
|
||||
const docObject = this.#activePreview.document.toObject();
|
||||
canvas.scene.createEmbeddedDocuments('MeasuredTemplate', [docObject]);
|
||||
this.#cancelTemplate(event);
|
||||
|
||||
canvas.scene.createEmbeddedDocuments('MeasuredTemplate', [this.#activePreview.document.toObject()]);
|
||||
this.#activePreview = undefined;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue