From ef3b19ed480ad0c736a7b748318eaae2429fddb3 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 14 Jun 2019 22:31:14 +0200 Subject: [PATCH] Clear ComponentDrag command --- src/commands/view/ComponentDrag.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/commands/view/ComponentDrag.js b/src/commands/view/ComponentDrag.js index 70d006429..73fe4f5be 100644 --- a/src/commands/view/ComponentDrag.js +++ b/src/commands/view/ComponentDrag.js @@ -1,5 +1,4 @@ import { keys, bindAll, each, isUndefined } from 'underscore'; -import { on, off } from 'utils/mixins'; import Dragger from 'utils/Dragger'; module.exports = { @@ -13,8 +12,7 @@ module.exports = { 'getPosition', 'getGuidesStatic', 'renderGuide', - 'getGuidesTarget', - 'handleScroll' + 'getGuidesTarget' ); const { target, event, mode, dragger = {} } = opts; const el = target.getEl(); @@ -415,23 +413,13 @@ module.exports = { }); }, - handleScroll(ev) { - console.log('Im scrolling', this.ppfx, { evY: ev.clientY, ev }); - }, - toggleDrag(enable) { const { ppfx, editor } = this; - const methods = { on, off }; const methodCls = enable ? 'add' : 'remove'; const canvas = this.getCanvas(); const classes = [`${ppfx}is__grabbing`]; const { Canvas } = editor; classes.forEach(cls => canvas.classList[methodCls](cls)); Canvas[enable ? 'startAutoscroll' : 'stopAutoscroll'](); - methods[enable ? 'on' : 'off']( - Canvas.getWindow(), - 'scroll', - this.handleScroll - ); } };