From 56121203bfdacf8f39f568b24b54b8105ca118c5 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 16 Aug 2021 21:34:30 +0100 Subject: [PATCH] Rename align actions to match existing align-selection-to-grid --- .../@node-red/editor-client/src/js/keymap.json | 13 +++++++------ .../editor-client/src/js/ui/view-tools.js | 15 +++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/keymap.json b/packages/node_modules/@node-red/editor-client/src/js/keymap.json index b9459e681..621fdaf41 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/keymap.json +++ b/packages/node_modules/@node-red/editor-client/src/js/keymap.json @@ -78,11 +78,12 @@ "left": "core:go-to-nearest-node-on-left", "up": "core:go-to-nearest-node-above", "down": "core:go-to-nearest-node-below", - "alt-a l": "core:align-nodes-to-left", - "alt-a r": "core:align-nodes-to-right", - "alt-a t": "core:align-nodes-to-top", - "alt-a b": "core:align-nodes-to-bottom", - "alt-a m": "core:align-nodes-to-middle", - "alt-a c": "core:align-nodes-to-center" + "alt-a g": "core:align-selection-to-grid", + "alt-a l": "core:align-selection-to-left", + "alt-a r": "core:align-selection-to-right", + "alt-a t": "core:align-selection-to-top", + "alt-a b": "core:align-selection-to-bottom", + "alt-a m": "core:align-selection-to-middle", + "alt-a c": "core:align-selection-to-center" } } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js index 001155519..367e173fd 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js @@ -536,8 +536,6 @@ RED.view.tools = (function() { RED.actions.add("core:show-selected-node-labels", function() { setSelectedNodeLabelState(true); }) RED.actions.add("core:hide-selected-node-labels", function() { setSelectedNodeLabelState(false); }) - RED.actions.add("core:align-selection-to-grid", alignToGrid); - RED.actions.add("core:scroll-view-up", function() { RED.view.scroll(0,-RED.view.gridSize());}); RED.actions.add("core:scroll-view-right", function() { RED.view.scroll(RED.view.gridSize(),0);}); RED.actions.add("core:scroll-view-down", function() { RED.view.scroll(0,RED.view.gridSize());}); @@ -574,12 +572,13 @@ RED.view.tools = (function() { RED.actions.add("core:go-to-nearest-node-above", function() { gotoNearestNode('up') }) RED.actions.add("core:go-to-nearest-node-below", function() { gotoNearestNode('down') }) - RED.actions.add("core:align-nodes-to-left", function() { alignSelectionToEdge('left') }) - RED.actions.add("core:align-nodes-to-right", function() { alignSelectionToEdge('right') }) - RED.actions.add("core:align-nodes-to-top", function() { alignSelectionToEdge('top') }) - RED.actions.add("core:align-nodes-to-bottom", function() { alignSelectionToEdge('bottom') }) - RED.actions.add("core:align-nodes-to-middle", function() { alignSelectionToEdge('middle') }) - RED.actions.add("core:align-nodes-to-center", function() { alignSelectionToEdge('center') }) + RED.actions.add("core:align-selection-to-grid", alignToGrid); + RED.actions.add("core:align-selection-to-left", function() { alignSelectionToEdge('left') }) + RED.actions.add("core:align-selection-to-right", function() { alignSelectionToEdge('right') }) + RED.actions.add("core:align-selection-to-top", function() { alignSelectionToEdge('top') }) + RED.actions.add("core:align-selection-to-bottom", function() { alignSelectionToEdge('bottom') }) + RED.actions.add("core:align-selection-to-middle", function() { alignSelectionToEdge('middle') }) + RED.actions.add("core:align-selection-to-center", function() { alignSelectionToEdge('center') })