Skip to content

Commit

Permalink
Fix hover node (#66)
Browse files Browse the repository at this point in the history
* Fix hover node

Fix node hover breaking when hoverConnectedEdges = false

* Add edit cluster edge

Add a method for editing cluster edge options

* Fix spelling mistake

* Actually change cluster edge options

setOptions doesn't work for cluster edges? used utils.extend to set options

* Remove updateClusterEdge

Don't actually need this

* yarn format
  • Loading branch information
Tyler-Maclachlan authored and micahstubbs committed Jul 18, 2019
1 parent 71d4ecd commit 10f1b4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/network/modules/SelectionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,12 @@ class SelectionHandler {
object instanceof Edge &&
hoveredEdgesCount === 0 &&
hoveredNodesCount === 0
const newOnlyHoveredNode =
object instanceof Node &&
hoveredEdgesCount === 0 &&
hoveredNodesCount === 0

if (hoverChanged || newOnlyHoveredEdge) {
if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) {
hoverChanged = this.emitHoverEvent(event, pointer, object)
}

Expand Down

0 comments on commit 10f1b4e

Please sign in to comment.