mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 15:39:02 +01:00
Fixed chatlog popout
This commit is contained in:
parent
687500f191
commit
d98dc26770
1 changed files with 8 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLog {
|
export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLog {
|
||||||
constructor() {
|
constructor(options) {
|
||||||
super();
|
super(options);
|
||||||
|
|
||||||
this.targetTemplate = {
|
this.targetTemplate = {
|
||||||
activeLayer: undefined,
|
activeLayer: undefined,
|
||||||
|
|
@ -14,6 +14,8 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
}
|
}
|
||||||
|
|
||||||
addChatListeners = async (app, html, data) => {
|
addChatListeners = async (app, html, data) => {
|
||||||
|
super.addChatListeners(app, html, data);
|
||||||
|
|
||||||
html.querySelectorAll('.duality-action-damage').forEach(element =>
|
html.querySelectorAll('.duality-action-damage').forEach(element =>
|
||||||
element.addEventListener('click', event => this.onRollDamage(event, data.message))
|
element.addEventListener('click', event => this.onRollDamage(event, data.message))
|
||||||
);
|
);
|
||||||
|
|
@ -64,10 +66,10 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
Hooks.on('renderChatMessageHTML', this.addChatListeners.bind());
|
Hooks.on('renderChatMessageHTML', this.addChatListeners.bind());
|
||||||
}
|
}
|
||||||
|
|
||||||
close(options) {
|
// close(options) {
|
||||||
Hooks.off('renderChatMessageHTML', this.addChatListeners);
|
// Hooks.off('renderChatMessageHTML', this.addChatListeners);
|
||||||
super.close(options);
|
// super.close(options);
|
||||||
}
|
// }
|
||||||
|
|
||||||
async getActor(id) {
|
async getActor(id) {
|
||||||
// return game.actors.get(id);
|
// return game.actors.get(id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue