Skip to content

Commit

Permalink
refacor(keypresshook): cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Oct 4, 2019
1 parent 35fa292 commit 845bae2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/graph-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('__');
Expand Down
1 change: 0 additions & 1 deletion src/hooks/useKeyPress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 845bae2

Please sign in to comment.