From 6636f4a7e2124dd4c24f04e3c15b402d898b6ebf Mon Sep 17 00:00:00 2001 From: bordun Date: Mon, 20 Apr 2020 08:33:59 +0200 Subject: [PATCH] editor: don't use reserved event name for uidragresize resize --- src/client/editor/index.js | 2 +- src/client/ui/ui-dragresize.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/editor/index.js b/src/client/editor/index.js index e8134c96..6bbb68b1 100644 --- a/src/client/editor/index.js +++ b/src/client/editor/index.js @@ -84,7 +84,7 @@ class Editor { dY = top - e.initTop this.moveWidget(dX, dY) }) - this.widgetDragResize.on('resize', (e)=>{ + this.widgetDragResize.on('drag-resize', (e)=>{ var width = Math.round(e.width / GRIDWIDTH) * GRIDWIDTH, height = Math.round(e.height / GRIDWIDTH) * GRIDWIDTH var dX = width - e.initWidth, diff --git a/src/client/ui/ui-dragresize.js b/src/client/ui/ui-dragresize.js index 98a252fe..6f9bacba 100644 --- a/src/client/ui/ui-dragresize.js +++ b/src/client/ui/ui-dragresize.js @@ -89,7 +89,7 @@ class UiDragResize extends UiWidget { this.container.classList.remove('dragging') this.left = Math.max(0, this.left) this.top = Math.max(0, this.top) - this.trigger(this.dragging.indexOf('left') > -1 ? 'move' : 'resize', this) + this.trigger(this.dragging.indexOf('left') > -1 ? 'move' : 'drag-resize', this) this.dragging = null }, {element: this.container})