mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-16 05:31:07 +01:00
Support drag and drop in adversary and environment sheets
This commit is contained in:
parent
2bae7900fe
commit
a4705f4204
5 changed files with 20 additions and 50 deletions
|
|
@ -25,7 +25,8 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
action: 'editAttribution'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
dragDrop: [{ dragSelector: '[data-item-id][draggable="true"]', dropSelector: null }]
|
||||
};
|
||||
|
||||
static PARTS = {
|
||||
|
|
@ -163,14 +164,6 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
});
|
||||
}
|
||||
|
||||
_onDropItem(event, item) {
|
||||
if (this.document.uuid !== item.parent?.uuid) {
|
||||
return null; // block all drag drop except internal ones
|
||||
}
|
||||
|
||||
return super._onDropItem(event, item);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Application Clicks Actions */
|
||||
/* -------------------------------------------- */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue