From aa32e0c7bc481839d8a22cc826fc9eaa7432333b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 30 Aug 2018 21:42:43 +0200 Subject: [PATCH] Add touch support in the sorter and ItemView --- src/navigator/view/ItemView.js | 1 - src/utils/Sorter.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/navigator/view/ItemView.js b/src/navigator/view/ItemView.js index aa6e7d27e..10f492ecb 100644 --- a/src/navigator/view/ItemView.js +++ b/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 diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index fc81f5899..0b93c162f 100644 --- a/src/utils/Sorter.js +++ b/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);