DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.74k stars 634 forks source link

[DYN-7839] Wires & Pins: improve snapping tolerance #15683

Open ivaylo-matov opened 4 days ago

ivaylo-matov commented 4 days ago

Purpose

PR aims to address DYN-7839.

This update enhances the snapping tolerance for connectors when interacting with the ConnectorAnchor.

A second, invisible connector has been introduced to handle MouseEnter and MouseLeave events. This invisible connector features a dynamic StrokeThickness that adjusts based on the current zoom level:

Zoom > 1: The StrokeThickness matches the visible connector's thickness (default: 3). Zoom < 1: The StrokeThickness dynamically scales with the zoom factor, ensuring that the actual snapping area on the screen remains consistent regardless of the zoom level. The StrokeThickness is doubled at smaller zoom factors to improve the responsiveness.

DYN-7839-Fix

Declarations

Check these if you believe they are true

Release Notes

Improved connector snapping at lower zoom levels for Pin and Watch buttons.

Reviewers

@QilongTang @reddyashish

FYIs

@dnenov

github-actions[bot] commented 4 days ago

UI Smoke Tests

Test: success. 11 passed, 0 failed. TestComplete Test Result Workflow Run: UI Smoke Tests Check: UI Smoke Tests

QilongTang commented 4 days ago

?

QilongTang commented 1 day ago

hi @ivaylo-matov Would love more time reviewing this PR, curious about the performance impact of the second connector here. Given this change would affect every connector, would you make some time comparison in bigger graphs?