refactor(api): use all elements instead of nodes only

This commit is contained in:
moklick
2019-07-24 23:44:48 +02:00
parent 9d44f26c68
commit 81746b2714
9 changed files with 38 additions and 25 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ export default (props) => {
const removePressed = useKeyPress('Backspace');
useEffect(() => {
if (removePressed && state.selectedNodeIds.length) {
props.onNodeRemove(state.selectedNodeIds);
if (removePressed && state.selectedElements.length) {
props.onElementsRemove(state.selectedElements);
dispatch(setNodesSelection({ isActive: false }));
}
}, [removePressed])