Correction compendiums
This commit is contained in:
@@ -30,6 +30,7 @@ export class CDELoksyuApp extends foundry.applications.api.HandlebarsApplication
|
||||
actions: {
|
||||
resetElement: CDELoksyuApp.#onResetElement,
|
||||
resetAll: CDELoksyuApp.#onResetAll,
|
||||
zoomVisual: CDELoksyuApp.#onZoomVisual,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -121,4 +122,11 @@ export class CDELoksyuApp extends foundry.applications.api.HandlebarsApplication
|
||||
for (const k of KEYS) data[k] = { yin: 0, yang: 0 }
|
||||
await setLoksyuData(data)
|
||||
}
|
||||
|
||||
static #onZoomVisual(_event, target) {
|
||||
new ImagePopout(target.src, {
|
||||
title: game.i18n.localize("CDE.LoksyuDiagramTitle"),
|
||||
shareable: false,
|
||||
}).render(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export class CDETinjiApp extends foundry.applications.api.HandlebarsApplicationM
|
||||
resizable: false,
|
||||
},
|
||||
classes: ["cde-app", "cde-tinji-standalone"],
|
||||
position: { width: 320, height: "auto" },
|
||||
position: { width: 380, height: "auto" },
|
||||
actions: {
|
||||
increment: CDETinjiApp.#onIncrement,
|
||||
decrement: CDETinjiApp.#onDecrement,
|
||||
|
||||
@@ -77,6 +77,7 @@ export class CDECharacterSheet extends CDEBaseActorSheet {
|
||||
this.#bindPrefs()
|
||||
this.#bindRollButtons()
|
||||
this.#bindComponentRandomize()
|
||||
this.#bindDiagramZoom()
|
||||
}
|
||||
|
||||
#bindInitiativeControls() {
|
||||
@@ -159,6 +160,17 @@ export class CDECharacterSheet extends CDEBaseActorSheet {
|
||||
})
|
||||
}
|
||||
|
||||
#bindDiagramZoom() {
|
||||
const img = this.element?.querySelector("[data-action='zoom-diagram']")
|
||||
if (!img) return
|
||||
img.addEventListener("click", () => {
|
||||
new ImagePopout(img.src, {
|
||||
title: game.i18n.localize("CDE.NghangDiagramTitle"),
|
||||
shareable: false,
|
||||
}).render(true)
|
||||
})
|
||||
}
|
||||
|
||||
#bindComponentRandomize() {
|
||||
const btn = this.element?.querySelector("[data-action='randomize-component']")
|
||||
if (!btn) return
|
||||
|
||||
Reference in New Issue
Block a user