Skip to content

Commit

Permalink
Set the drag/drop effect to move
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Sep 4, 2018
1 parent 8c575d2 commit a96bb4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/components/src/draggable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Draggable extends Component {
* @param {Object} event The non-custom DragEvent.
*/
onDragOver( event ) {
event.dataTransfer.dropEffect = 'move';
this.cloneWrapper.style.top =
`${ parseInt( this.cloneWrapper.style.top, 10 ) + event.clientY - this.cursorTop }px`;
this.cloneWrapper.style.left =
Expand Down Expand Up @@ -90,6 +91,7 @@ class Draggable extends Component {
}

event.dataTransfer.setData( 'text', JSON.stringify( transferData ) );
event.dataTransfer.effectAllowed = 'move';

// Prepare element clone and append to element wrapper.
const elementRect = element.getBoundingClientRect();
Expand Down

0 comments on commit a96bb4b

Please sign in to comment.