Skip to content

Commit

Permalink
(amend)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunomiac committed Jan 20, 2024
1 parent 1cab32a commit 05cbb75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions module/sheets/item/BladesProjectSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,15 @@ class BladesProjectSheet extends BladesItemSheet {
eLog.checkLog3("BladesProject", "Clock Name Change", { action, value: $(event.currentTarget).val() });
if (action === "presented-clock-name" && this.presentedClock) {
this.presentedClock.updateTarget("name", $(event.currentTarget).val());
keyElems$.clocks[this.presentedClock.id].clockLabel$
.text($(event.currentTarget).val());
}
else if (action === "current-clock-name") {
this.document.clockKey.currentClock.updateTarget("name", $(event.currentTarget).val());
keyElems$.clocks[this.document.clockKey.currentClock.id].clockLabel$
.text($(event.currentTarget).val());
}
clockKey.formatLabels(keyElems$);
}
});
// Initialize clock key elements
Expand Down
5 changes: 5 additions & 0 deletions ts/sheets/item/BladesProjectSheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,14 @@ class BladesProjectSheet extends BladesItemSheet {
eLog.checkLog3("BladesProject", "Clock Name Change", {action, value: $(event.currentTarget).val()});
if (action === "presented-clock-name" && this.presentedClock) {
this.presentedClock.updateTarget("name", $(event.currentTarget).val());
keyElems$.clocks[this.presentedClock.id].clockLabel$
.text($(event.currentTarget).val() as string);
} else if (action === "current-clock-name") {
this.document.clockKey.currentClock.updateTarget("name", $(event.currentTarget).val());
keyElems$.clocks[this.document.clockKey.currentClock.id].clockLabel$
.text($(event.currentTarget).val() as string);
}
clockKey.formatLabels(keyElems$);
}
});

Expand Down

0 comments on commit 05cbb75

Please sign in to comment.