- List<IElement> snap = new ArrayList<>(diagram.getSnapshot());
-
- snap.removeAll(pickables);
-
- boolean changed = false;
- for (IElement sn : snap) {
- Node node = sn.getHint(DistrictNetworkVertexElement.KEY_DN_VERTEX_NODE);
- if (node instanceof DistrictNetworkVertexNode) {
- if (((DistrictNetworkVertexNode) node).hover(false) && !changed) {
- changed = true;
+// boolean changed = false;
+// changed |= hoverNodes(snap, false, isConnectionTool, currentMousePos);
+// changed |= hoverNodes(pickables, true, isConnectionTool, currentMousePos);
+ //return changed;
+ }
+
+ private boolean hoverNodes2(List<IElement> elements, boolean hover, boolean isConnectionTool, Point2D p) {
+ if (elements == null || elements.isEmpty()) {
+ return dynamicVisualisationContributionsParticipant.doHover(false, isConnectionTool);
+ } else {
+ boolean changed = dynamicVisualisationContributionsParticipant.doHover(true, isConnectionTool);
+ if (changed) {
+ // we prefer the first picked element only
+ IElement elem = elements.get(0);
+ G2DParentNode node = elem.getHint(DistrictNetworkVertexElement.KEY_DN_VERTEX_NODE);
+ if (node instanceof DistrictNetworkVertexNode) {
+ } else {
+ node = elem.getHint(DistrictNetworkEdgeElement.KEY_DN_EDGE_NODE);