From c58401010a196e0d9b79e71cf9cb69eb109026d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20POTTIER?= Date: Mon, 24 Apr 2023 17:59:09 +0200 Subject: [PATCH 1/2] Correction du drag&drop multiple --- addon/services/drag-coordinator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/services/drag-coordinator.js b/addon/services/drag-coordinator.js index d9f81ee..ac223ee 100644 --- a/addon/services/drag-coordinator.js +++ b/addon/services/drag-coordinator.js @@ -76,7 +76,7 @@ export default Service.extend({ draggingOver(event, emberObject) { const currentOffsetItem = this.get('currentOffsetItem'); const pos = this.relativeClientPosition(emberObject.element, event); - const hasSameSortingScope = this.get('currentDragItem.sortingScope') === emberObject.get('sortingScope'); + const hasSameSortingScope = this.get('currentDragItem').get('sortingScope') === emberObject.get('sortingScope'); let moveDirections = []; if (!this.get('lastEvent')) { From 5d897f465c48193ce6d0d4eedc22afd370cace38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20POTTIER?= Date: Fri, 2 Jun 2023 14:04:30 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Correction=20du=20bug=20sur=20le=20fait=20d?= =?UTF-8?q?e=20pouvoir=20red=C3=A9placer=20un=20=C3=A9l=C3=A9ment=20qui=20?= =?UTF-8?q?vient=20d'=C3=AAtre=20pos=C3=A9=20sans=20avoir=20=C3=A0=20faire?= =?UTF-8?q?=20un=20mouseout=20et=20un=20mouseover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon/components/draggable-object.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addon/components/draggable-object.js b/addon/components/draggable-object.js index 3a8a8b6..400522d 100644 --- a/addon/components/draggable-object.js +++ b/addon/components/draggable-object.js @@ -136,9 +136,11 @@ export default Component.extend({ if(this.get('dragEndAction')) { this.get('dragEndAction')(obj, event); } - if (this.get('dragHandle')) { + // ceci empêche le fait que lorsqu'on lâche un élément et que le curseur de la souris est toujours dans le DOM qui déclenche le fait que l'item + // soit déplaçable, on puisse déplacer à nouveau l'item sans avoir à faire sortir puis re-rentrer la souris sur l'item + /*if (this.get('dragHandle')) { this.set('dragReady', false); - } + }*/ }, drag(event) {