Merge branch 'v1.5-fix-drop-on-conteneur' into 'v1.5'

V1.5 fix drop on conteneur

See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!308
This commit is contained in:
Leratier Bretonnien 2022-01-01 13:38:20 +00:00
commit 5715c7aa72
6 changed files with 25 additions and 24 deletions

View File

@ -135,9 +135,10 @@ export class RdDActorSheet extends ActorSheet {
this.actor.addSubacteur(dragData.id || dragData.data._id);
super._onDropActor(event, dragData);
}
/* -------------------------------------------- */
async _onDropItem(event, dragData) {
const destItemId = RdDSheetUtility.getItemId(event);
const destItemId = $(event.target)?.closest('.item').attr('data-item-id');
const dropParams = RdDSheetUtility.prepareItemDropParameters(destItemId, this.actor.id, dragData, this.objetVersConteneur);
const callSuper = await this.actor.processDropItem(dropParams);
if (callSuper) {

View File

@ -70,7 +70,7 @@ export class RdDActorVehiculeSheet extends ActorSheet {
/* -------------------------------------------- */
async _onDropItem(event, dragData) {
const destItemId = RdDSheetUtility.getItemId(event);
const destItemId = $(event.target)?.closest('.item').attr('data-item-id');
const dropParams = RdDSheetUtility.prepareItemDropParameters(destItemId, this.actor.id, dragData, this.objetVersConteneur);
const callSuper = await this.actor.processDropItem(dropParams);
if (callSuper) {

View File

@ -339,7 +339,7 @@ export class RdDUtility {
}
/* -------------------------------------------- */
static initAfficheContenu(actorId) { // persistent handling of conteneur show/hide
static initAfficheContenu() { // persistent handling of conteneur show/hide
if (!this.afficheContenu)
this.afficheContenu = {};
}