Commit df52480d authored by Michael Vrána's avatar Michael Vrána

Clear algorithm canvas keybind

parent fa92df02
Pipeline #80145 passed with stages
in 4 minutes and 24 seconds
......@@ -9,7 +9,7 @@ import { useAlgorithmExport } from './useAlgorithmExport'
import { useAlgorithmImport } from './useAlgorithmImport'
const { toggleGrid, setCursorMode } = algorithmCanvasActions
const { deleteNode, deleteEdge } = algorithmDataActions
const { deleteNode, deleteEdge, clear } = algorithmDataActions
const { undoAlgorithm, redoAlgorithm, setAlgorithmToolbarOpen } = Actions
export const useAlgorithmKeybinds = () => {
......@@ -75,6 +75,9 @@ export const useAlgorithmKeybinds = () => {
case 'o':
if (e.ctrlKey) handleImport()
break
case 'x':
if (e.ctrlKey) dispatch(clear())
break
}
},
[dispatch, handleDelete, algorithmToolbarOpen, evaluate, handleImport, handleExport]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment