army sheet : added ability to drop a actor for commander & warlord, and some fixes
This commit is contained in:
@@ -70,7 +70,7 @@ export class HelpersL5r5e {
|
||||
* @return {Promise<null>}
|
||||
*/
|
||||
static async getDragnDropTargetObject(event) {
|
||||
const json = event.dataTransfer.getData("text/plain");
|
||||
const json = event.dataTransfer?.getData("text/plain");
|
||||
if (!json) {
|
||||
return null;
|
||||
}
|
||||
@@ -427,6 +427,18 @@ export class HelpersL5r5e {
|
||||
}
|
||||
return await item.renderTextTemplate();
|
||||
});
|
||||
|
||||
// Open actor sheet
|
||||
html.find(".open-sheet-actor-id").on("click", (event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const id = $(event.currentTarget).data("actor-id");
|
||||
if (!id) {
|
||||
return;
|
||||
}
|
||||
game.actors.get(id)?.sheet?.render(true);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user