Find roll buttons via data-roll-formula and not the roll class.
This commit is contained in:
parent
0deda3235a
commit
15462c98fb
3 changed files with 2 additions and 7 deletions
|
|
@ -41,7 +41,7 @@ export class GenericActorSheet extends ActorSheet {
|
|||
console.debug(`.dungeon | Generic sheet adding listeners`);
|
||||
|
||||
html.find(`summary`).on(`click`, this._handleSummaryToggle.bind(this));
|
||||
html.find(`.roll`).on(`click`, this._handleRoll.bind(this));
|
||||
html.find(`[data-roll-formula]`).on(`click`, this._handleRoll.bind(this));
|
||||
html.find(`[data-embedded-update]`)
|
||||
.on(`change`, this.actor.genericEmbeddedUpdate.bind(this.actor));
|
||||
html.find(`[data-embedded-delete]`)
|
||||
|
|
@ -56,10 +56,6 @@ export class GenericActorSheet extends ActorSheet {
|
|||
|
||||
async _handleRoll($e) {
|
||||
let data = $e.currentTarget.dataset;
|
||||
if (!data.rollFormula) {
|
||||
console.warn(`.dungeon | Element has .roll class with no roll formula`, $e.target);
|
||||
return;
|
||||
};
|
||||
console.debug(`.dungeon | Attempting to roll with formula "${data.rollFormula}"`);
|
||||
|
||||
let flavor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue