GM Monitor : added the ability to dnd an image actor to map

This commit is contained in:
Vlyan
2021-12-06 12:47:39 +01:00
parent f6cc3015cb
commit c11b39112c
4 changed files with 23 additions and 30 deletions

View File

@@ -82,8 +82,6 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
return;
}
html.find(".entity-link").on("dragstart", this._onDragEntityLink.bind(this));
// Delete the linked Actor (warlord/commander)
html.find(".actor-remove-control").on("click", this._removeLinkedActor.bind(this));
}
@@ -117,24 +115,6 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
return out;
}
/**
* Callback actions which occur at the beginning of a drag start workflow.
* @param {DragEvent} event The originating DragEvent
*/
_onDragEntityLink(event) {
const actorId = $(event.currentTarget).data("actor-id");
if (!actorId) {
return;
}
event.originalEvent.dataTransfer.setData(
"text/plain",
JSON.stringify({
type: "Actor",
id: actorId,
})
);
}
/**
* Handle dropped Item data on the Actor sheet (cohort, fortification)
* @param {DragEvent} event