refacor(keypresshook): cleanup

This commit is contained in:
moklick
2019-10-04 22:43:19 +02:00
parent 35fa2926c6
commit 845bae284f
2 changed files with 1 additions and 1 deletions

View File

@@ -129,6 +129,7 @@ export const getNodesInside = (nodes, bbox, transform = [0, 0, 1], partially = f
export const getConnectedEdges = (nodes, edges) => {
const nodeIds = nodes.map(n => n.id);
return edges.filter(e => {
const hasSourceHandleId = e.source.includes('__');
const hasTargetHandleId = e.target.includes('__');

View File

@@ -6,7 +6,6 @@ export default function useKeyPress(keyCode) {
const [keyPressed, setKeyPressed] = useState(false);
function downHandler(evt) {
console.log(keyCode, evt.keyCode);
if (evt.keyCode === keyCode && !isInputNode(evt.target)) {
setKeyPressed(true);
}