boolean repaint = false;
Point2D p = NodeUtil.worldToLocal(this, e.controlPosition, new Point2D.Double());
boolean isConnectionTool = mode == Hints.CONNECTTOOL || e.hasAnyModifier(MouseEvent.ALT_MASK | MouseEvent.ALT_GRAPH_MASK);
boolean repaint = false;
Point2D p = NodeUtil.worldToLocal(this, e.controlPosition, new Point2D.Double());
boolean isConnectionTool = mode == Hints.CONNECTTOOL || e.hasAnyModifier(MouseEvent.ALT_MASK | MouseEvent.ALT_GRAPH_MASK);
- if (participant.pickHoveredElement(p, isConnectionTool)) {
+ // To boost pan perf hovering is only considered if no mouse button is pressed)
+ if (e.buttons == 0 && participant.pickHoveredElement(p, isConnectionTool)) {
repaint = true;
}
if (!nodes.isEmpty()) {
repaint = true;
}
if (!nodes.isEmpty()) {