From 551a0720ee95d71010419314a97b361616962110 Mon Sep 17 00:00:00 2001 From: bravo-kernel Date: Sun, 21 Oct 2018 15:05:49 +0200 Subject: [PATCH 1/6] Adds downloads badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f04176b..62f56fc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Ember Drag Drop [![Build Status](https://travis-ci.org/mharris717/ember-drag-drop.svg?branch=master)](https://travis-ci.org/mharris717/ember-drag-drop) +[![Download Total](https://img.shields.io/npm/dt/ember-drag-drop.svg)](http://badge.fury.io/js/ember-drag-drop) Simple drag and drop addon for your Ember CLI app. From d80697eed091cfcbba6da6a2a45611e257194122 Mon Sep 17 00:00:00 2001 From: Jacob Quant Date: Thu, 29 Nov 2018 17:16:51 -0600 Subject: [PATCH 2/6] Guard against missing currentDragEvent --- 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 c8670c5..8a05013 100644 --- a/addon/services/drag-coordinator.js +++ b/addon/services/drag-coordinator.js @@ -85,7 +85,7 @@ export default Service.extend({ this.set('lastEvent', event); - if (!this.get('isMoving')) { + if (!this.get('isMoving') && this.get('currentDragEvent')) { if (event.target !== this.get('currentDragEvent').target && hasSameSortingScope) { //if not dragging over self if (currentOffsetItem !== emberObject) { if (pos.py > 0.33 && moveDirection === 'up' || pos.py > 0.33 && moveDirection === 'down') { From 104895e74eb7850490024a66e0e2f60ff3fdb1f5 Mon Sep 17 00:00:00 2001 From: Tony Miller Date: Mon, 3 Dec 2018 14:14:28 +0900 Subject: [PATCH 3/6] upgrade to ember-cli-babel 7.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 66f1799..fd2980e 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "test": "tests" }, "dependencies": { - "ember-cli-babel": "^6.6.0", + "ember-cli-babel": "7.1.3", "ember-jquery-legacy": "^1.0.0" }, "ember-addon": { From 023b8f55bfd8f99e085a390baa52b4639cc70f98 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Sun, 3 Feb 2019 21:52:02 -0800 Subject: [PATCH 4/6] Use preventDefault when dropping Without this Firefox sometimes follows a link to a random numeric place. --- addon/components/sortable-objects.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addon/components/sortable-objects.js b/addon/components/sortable-objects.js index f9a75d9..9ca3ade 100644 --- a/addon/components/sortable-objects.js +++ b/addon/components/sortable-objects.js @@ -47,6 +47,7 @@ export default Component.extend( { drop(event) { event.stopPropagation(); + event.preventDefault(); this.set('dragCoordinator.sortComponentController', undefined); if (this.get('enableSort') && this.get('sortEndAction')) { this.get('sortEndAction')(event); From a385242e390901461b206094f7364542f4f2106a Mon Sep 17 00:00:00 2001 From: Derek Gavey Date: Sat, 2 Mar 2019 15:01:22 -0700 Subject: [PATCH 5/6] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd2980e..e1b4059 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-drag-drop", - "version": "0.6.2", + "version": "0.6.3", "description": "Addon for Ember CLI to do drag and drop", "scripts": { "build": "ember build", From 7211f44f25254669a5fe7f330fb9ce49d03fa557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Nie=C5=BCurawski?= Date: Thu, 25 Apr 2019 11:29:48 +0200 Subject: [PATCH 6/6] Fix broken links in README.md and use https --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 62f56fc..2201816 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ Ember.Controller.extend({ } }); ``` -You can check out an example of this is action [here](http://mharris717.github.io/ember-drag-drop/) +You can check out an example of this is action [here](https://mharris717.github.io/ember-drag-drop/) ## Sorting of objects @@ -193,13 +193,13 @@ An Example: {{/sortable-objects}} ``` -On drop of an item in the list, the sortableObjectList is re-ordered and the sortEndAction is fired unless the optional parameter 'enableSort' is false. You can check out an example of this is action [here](http://mharris717.github.io/ember-drag-drop/) +On drop of an item in the list, the sortableObjectList is re-ordered and the sortEndAction is fired unless the optional parameter 'enableSort' is false. You can check out an example of this is action [here](https://mharris717.github.io/ember-drag-drop/) -`useSwap` defaults to true and is optional. If you set it to false, then the sort algorithm will cascade the swap of items, pushing the values down the list. [See Demo](http://mharris717.github.io/ember-drag-drop/horizontal) +`useSwap` defaults to true and is optional. If you set it to false, then the sort algorithm will cascade the swap of items, pushing the values down the list. [See Demo](https://mharris717.github.io/ember-drag-drop/#/horizontal) `inPlace` defaults to false and is optional. If you set it to true, then the original list will be mutated instead of making a copy. -`sortingScope` is optional and only needed if you have multiple lists on the screen that you want to share dragging between. [See Demo](http://mharris717.github.io/ember-drag-drop/multiple) +`sortingScope` is optional and only needed if you have multiple lists on the screen that you want to share dragging between. [See Demo](https://mharris717.github.io/ember-drag-drop/#/multiple) **Note: It's important that you add the isSortable=true to each draggable-object or else that item will be draggable, but will not change the order of any item. Also if you set a custom sortingScope they should be the same for the sortable-object and the draggable-objects it contains.**