Skip to content

Commit

Permalink
better background click
Browse files Browse the repository at this point in the history
  • Loading branch information
gabotechs committed Dec 26, 2023
1 parent 9984d7c commit 115b387
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/entropy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@
.backgroundColor('#000003')
.nodeResolution(SETTINGS.NODE_RESOLUTION)
.onBackgroundClick(() => {
Graph.zoomToFit(SETTINGS.DEFAULT_DISTANCE)
selectNode(undefined)
if (selectedNode) {
selectNode(undefined)
} else {
Graph.zoomToFit(SETTINGS.DEFAULT_DISTANCE)
}
})
// Node params
.nodeLabel(({fileName, dirName, loc}) => `<div class="nodeLabel">
Expand Down

0 comments on commit 115b387

Please sign in to comment.