Browse Source

Add touch support in the sorter and ItemView

pull/1397/head
Artur Arseniev 8 years ago
parent
commit
aa32e0c7bc
  1. 1
      src/navigator/view/ItemView.js
  2. 4
      src/utils/Sorter.js

1
src/navigator/view/ItemView.js

@ -223,7 +223,6 @@ module.exports = Backbone.View.extend({
* @param Event
* */
startSort(e) {
console.log('starting startSort', e.type);
e.stopPropagation();
const sorter = this.sorter;
// Right or middel click

4
src/utils/Sorter.js

@ -279,7 +279,7 @@ module.exports = Backbone.View.extend({
}
on(container, 'mousemove dragover', this.onMove);
on(docs, 'mouseup dragend', this.endMove);
on(docs, 'mouseup dragend touchend', this.endMove);
on(docs, 'keydown', this.rollback);
onStart && onStart();
@ -912,7 +912,7 @@ module.exports = Backbone.View.extend({
const onEndMove = this.onEndMove;
const { target, lastPos } = this;
off(container, 'mousemove dragover', this.onMove);
off(docs, 'mouseup dragend', this.endMove);
off(docs, 'mouseup dragend touchend', this.endMove);
off(docs, 'keydown', this.rollback);
//this.$document.off('mouseup', this.endMove);
//this.$document.off('keydown', this.rollback);

Loading…
Cancel
Save