Skip to content

Commit

Permalink
remove the flicker on drop
Browse files Browse the repository at this point in the history
Ok. So it turns out that removing the flicker on
drop was relatively straight forward.  Avoid putting
the thing back where it was, so we don't re-re-render.
  • Loading branch information
michaelmalonenz committed Sep 6, 2017
1 parent 63ce0e1 commit 1cda772
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dragula-and-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export class DragulaAndDrop {
invalid: this._invalid.bind(this)
};

let options = Object.assign(aureliaOptions, boundOptions);
this.dragula = new Dragula(options);
this.options = Object.assign(aureliaOptions, boundOptions);
this.dragula = new Dragula(this.options);

this.dragula.on('drop', this._dropFunction.bind(this));

Expand Down Expand Up @@ -88,7 +88,7 @@ export class DragulaAndDrop {
}

_dropFunction(item, target, source, sibling, itemVM, siblingVM) {
this.dragula.cancel();
this.dragula.cancel(this.options.revertOnSpill, true);
if (typeof this.dropFn === 'function')
this.dropFn({ item, target, source, sibling, itemVM, siblingVM });
}
Expand Down

0 comments on commit 1cda772

Please sign in to comment.