From 90a29dc99d1b1e58777ade99eb5805f828d06148 Mon Sep 17 00:00:00 2001 From: Christian Lopes Date: Mon, 11 Mar 2024 16:20:44 -0300 Subject: [PATCH] Removes the 'Delete Selected Nodes' button and the listeners for the del/backspace keys (commented out) -- #262, #266 --- src/client/components/network-editor/main.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/client/components/network-editor/main.js b/src/client/components/network-editor/main.js index 39e4b1a..40b3630 100644 --- a/src/client/components/network-editor/main.js +++ b/src/client/components/network-editor/main.js @@ -28,7 +28,6 @@ import FitScreenIcon from '@material-ui/icons/SettingsOverscan'; import AddIcon from '@material-ui/icons/Add'; import RemoveIcon from '@material-ui/icons/Remove'; import UndoIcon from '@material-ui/icons/Undo'; -import DeleteIcon from '@material-ui/icons/Delete'; import RestoreIcon from '@material-ui/icons/SettingsBackupRestore'; import LinkIcon from '@material-ui/icons/Link'; import InsertDriveFileOutlinedIcon from '@material-ui/icons/InsertDriveFileOutlined'; @@ -172,12 +171,12 @@ function RestoreConfirmDialog({ open, isMobile, onOk, onCancel }) { - + {/* - + */} @@ -370,11 +369,12 @@ const Main = ({ onClick: () => controller.undoHandler.undo(), isEnabled: () => undoEnabled, }, + // { + // title: "Delete Selected Nodes", + // icon: , + // onClick: () => controller.deleteSelectedNodes(), + // }, { - title: "Delete Selected Nodes", - icon: , - onClick: () => controller.deleteSelectedNodes(), - }, { title: "Restore Network to Initial Layout", icon: , onClick: handleNetworkRestore, @@ -417,9 +417,10 @@ const Main = ({ .bind('left', panner.panLeft) .bind('right', panner.panRight) .bind(['f', 'space'], panner.fit) - .bind(['backspace','del'], () => controller.deleteSelectedNodes()); + // .bind(['backspace','del'], () => controller.deleteSelectedNodes()) + ; - return () => Mousetrap.unbind(['-','_','=','+','up','down','left','right','f','space','backspace','del']); + return () => Mousetrap.unbind(['-','_','=','+','up','down','left','right','f','space'/**,'backspace','del'*/]); }, [panner]); return (