From 89f452387606dc2e1242acb1bf20b7493925e1e3 Mon Sep 17 00:00:00 2001 From: navaneeth Date: Mon, 17 May 2021 09:42:52 +0530 Subject: [PATCH] Avoiding unwanted resize initiation --- frontend/src/Editor/ConfigHandle.jsx | 7 ++++--- frontend/src/Editor/DraggableBox.jsx | 18 ++++++++++-------- frontend/src/Editor/Editor.jsx | 1 + 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/frontend/src/Editor/ConfigHandle.jsx b/frontend/src/Editor/ConfigHandle.jsx index 49b037d99f..0a80a827f1 100644 --- a/frontend/src/Editor/ConfigHandle.jsx +++ b/frontend/src/Editor/ConfigHandle.jsx @@ -3,12 +3,13 @@ import React from 'react'; export const ConfigHandle = function ConfigHandle({ id, component, - configHandleClicked + configHandleClicked, + dragRef }) { - return
+ return
{ e.preventDefault(); configHandleClicked(id, component) }} className="badge badge bg-azure-lt" role="button"> - + {component.name}
diff --git a/frontend/src/Editor/DraggableBox.jsx b/frontend/src/Editor/DraggableBox.jsx index e74b2bcb6e..1fa82a7d0c 100644 --- a/frontend/src/Editor/DraggableBox.jsx +++ b/frontend/src/Editor/DraggableBox.jsx @@ -115,13 +115,7 @@ export const DraggableBox = function DraggableBox({
{inCanvas ? (
- {mode === 'edit' && - configHandleClicked(id, component)} - /> - } + -
+
+ {mode === 'edit' && + configHandleClicked(id, component)} + /> + } { + this.switchSidebarTab(1); this.setState({ selectedComponent: { id, component } }); }