childRef.current.handleAddNode()}
selectedNode={selectedNode}
resetCanvas={resetCanvas}
/>
diff --git a/src/pages/MindMap/index.tsx b/src/pages/MindMap/index.tsx
index 8f21bda..52d872a 100644
--- a/src/pages/MindMap/index.tsx
+++ b/src/pages/MindMap/index.tsx
@@ -28,7 +28,7 @@ import GenIdeaPanel from './overlays/GenIdeaPanel';
const keyMap = {
ADD_NODE: 'ctrl+enter',
DELETE_NODE: ['del', 'backspace'],
- EDIT_NODE_TEXT: 'enter',
+ EDIT_NODE_TEXT: 'shift+enter',
// Not Implemented
GENERATE_IDEAS: 'ctrl+shift+enter',
// Not Implemented
@@ -37,8 +37,8 @@ const keyMap = {
TOGGLE_SETTINGS: 'ctrl+shift+p',
MOVE_SELECTION_TO_PARENT: ['up', '`'],
MOVE_SELECTION_TO_CHILD: 'down',
- MOVE_SELECTION_TO_NEXT_SIBLING: ['right', 'tab'],
- MOVE_SELECTION_TO_PREVIOUS_SIBLING: ['left', 'shift+tab'],
+ MOVE_SELECTION_TO_NEXT_SIBLING: ['right'],
+ MOVE_SELECTION_TO_PREVIOUS_SIBLING: ['left'],
MOVE_SELECTION_TO_ROOT: ['0', 'ctrl+up'],
RESET_VIEW: ['ctrl+0', 'home'],
LOCK_NODE: ['l', 'ctrl+l', 'space'],
@@ -172,8 +172,6 @@ const MindMap = () => {
}
};
- if (!mindmap) return Sorry, I couldn't find that mindmap.
;
-
const shortcutHandlers = {
TOGGLE_SETTINGS: () => {
// eslint-disable-next-line no-console
@@ -184,6 +182,8 @@ const MindMap = () => {
// Get the mindmap node with id 0, which is the root node
const rootNode = mindmap.nodes.find((o) => o.id === 0);
+ if (!mindmap) throw new Error('Sorry, I couldn't find that mindmap.');
+
if (!rootNode) {
throw new Error('Root node not found!');
}
diff --git a/src/pages/MindMap/overlays/BottomBar/KeyBindsDialog.tsx b/src/pages/MindMap/overlays/BottomBar/KeyBindsDialog.tsx
index a9ee1ad..5f3f7b0 100644
--- a/src/pages/MindMap/overlays/BottomBar/KeyBindsDialog.tsx
+++ b/src/pages/MindMap/overlays/BottomBar/KeyBindsDialog.tsx
@@ -37,9 +37,6 @@ const KeyBindsDialog = ({
const aboutPanel = (
-
- About
-
This is a mind map editor designed and built by Saketh Reddy and Eric
@@ -49,7 +46,13 @@ const KeyBindsDialog = ({
This project is open source. You can find the source code on{' '}
- GitHub.
+
+ GitHub
+
+ .
@@ -59,6 +62,7 @@ const KeyBindsDialog = ({
href="mailto:
support@bubblemap.app
"
+ style={{ color: 'white' }}
>
support@bubblemap.app
@@ -96,38 +100,42 @@ const KeyBindsDialog = ({
{mapEntry(
'Ctrl + Enter',
- 'Add Child Node to Selected Node'
+ 'Add Bubble to Selected Bubble'
)}
{mapEntry(
// Double space 'or' statements using   
'Delete  or  Backspace',
- 'Delete Selected Node'
+ 'Delete Selected Bubble'
)}
{mapEntry(
- // Enter -> Edit Node Text
- 'Enter',
- 'Edit Selected Node Text'
+ 'Shift + Enter',
+ 'Edit Selected Bubble'
)}
- Node Selection Manipulation
+
+ Bubble Selection Manipulation
+
- {mapEntry('Up', 'Select Parent Node')}
- {mapEntry('Down', 'Select Child Node')}
+ {mapEntry('Up', 'Select Parent Bubble')}
+ {mapEntry('Down', 'Select Child Bubble')}
{mapEntry(
'Left',
- 'Select Next Sibling Node (Counter-Clockwise)'
+ 'Select Next Sibling Bubble (Counter-Clockwise)'
+ )}
+ {mapEntry(
+ 'Right',
+ 'Select Next Sibling Bubble (Clockwise)'
)}
- {mapEntry('Right', 'Select Next Sibling Node (Clockwise)')}
{/* 'Move selection to root" is '0' or 'ctrl'+'up */}
{mapEntry(
'0  or  Ctrl + Up',
- 'Select Root Node'
+ 'Select Root Bubble'
)}
@@ -139,11 +147,11 @@ const KeyBindsDialog = ({
- {/* Space, 'l', or 'ctrl+l' map to Lock Node */}
+ {/* Space, 'l', or 'ctrl+l' map to Lock Bubble */}
{mapEntry(
'Space  or  L',
- 'Lock Node'
+ 'Lock Bubble'
)}
{/* Reset Pan and Zoom back to Default */}
{mapEntry(
@@ -179,25 +187,28 @@ const KeyBindsDialog = ({
- Mouse-Node Interactions
+ Mouse-Bubble Interactions
- {mapEntry('Left Click Node', 'Select Node')}
- {mapEntry('Drag Node', 'Move Node')}
- {mapEntry('Right Click Node', 'Open Context Menu')}
+ {mapEntry('Left Click Bubble', 'Select Bubble')}
+ {mapEntry('Drag Bubble', 'Move Bubble')}
+ {mapEntry('Right Click Bubble', 'Open Context Menu')}
{/* Double Click */}
- {mapEntry('Double Click Node', 'Edit Node Text')}
+ {mapEntry('Double Click Bubble', 'Edit Bubble Text')}
{/* Control Click */}
{mapEntry(
- 'Ctrl + Left Click Node',
- 'Add Child Node to Selected Node'
+ 'Ctrl + Left Click Bubble',
+ 'Add Bubble to Selected Bubble'
)}
{/* Shift Click */}
- {mapEntry('Shift + Left Click Node', 'Lock Node Position')}
+ {mapEntry(
+ 'Shift + Left Click Bubble',
+ 'Lock Bubble Position'
+ )}
{/* Alt Click */}
- {mapEntry('Alt + Left Click Node', 'Delete Node')}
+ {mapEntry('Alt + Left Click Bubble', 'Delete Bubble')}
{/* Mouse-Canvas Interaction */}
@@ -215,73 +226,6 @@ const KeyBindsDialog = ({
);
- // const mouseShortcutsPanel = (
- // // table displaying an icon, the mouse actions, and corresponding shortcuts side by side
- //
- //
- //
- //
- // Icon
- // Action
- // Effect
- //
- //
- //
- //
- //
- // {/* */}
- //
- // Left Click Node
- // Select Node
- //
- //
- //
- // {/* */}
- //
- // Drag Node
- // Move Node
- //
- //
- //
- // {/* */}
- //
- // Right Click Node
- // Open Node Menu
- //
- //
- //
- // {/* */}
- //
- // Double Click Node
- // Edit Node
- //
- //
- //
- // {/* */}
- //
- // Control + Click Node
- // Add Child Node
- //
- //
- //
- // {/* */}
- //
- // Shift + Click Node
- // Lock Node
- //
- //
- //
- // {/* */}
- //
- // Alt + Click Node
- // Delete Node
- //
- // {/* End */}
- //
- //
- //
- // );
-
return (