Skip to content

Conversation

@ivaylo-matov
Copy link
Contributor

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

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

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

Reviewers

@QilongTang
@reddyashish

FYIs

@dnenov

@github-actions github-actions bot changed the title Dyn 7839 wires & pins improve snapping tolerance DYN-: Dyn 7839 wires & pins improve snapping tolerance Nov 22, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-7839

@ivaylo-matov ivaylo-matov changed the title DYN-: Dyn 7839 wires & pins improve snapping tolerance [DYN-7839] Wires & Pins: improve snapping tolerance Nov 22, 2024
@github-actions
Copy link

github-actions bot commented Nov 22, 2024

UI Smoke Tests

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

@QilongTang QilongTang added this to the 3.5 milestone Nov 22, 2024
@QilongTang
Copy link
Contributor

?

@ivaylo-matov ivaylo-matov reopened this Nov 22, 2024
@QilongTang
Copy link
Contributor

QilongTang commented Nov 25, 2024

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?

@ivaylo-matov
Copy link
Contributor Author

@achintyabhat, I’ve implemented scaling functionality for the anchor, pin, and watch buttons. The size of these buttons now decreases as you zoom out with a non-linear scaling behavior. At Zoom = 1, the buttons retain their default size, but at smaller scales, the size gradually reduces to half of their original dimensions. IMO keeping the default button size at smaller scales looks odd. With this scaling behavior, the buttons remain comfortably clickable, even at zoom levels where the connector is no longer visible.

DYN-7839-ButtonsFix

@QilongTang, I compared the opening times for Performance-Test.dyn against master and saw no degradation in performance.

@reddyashish reddyashish merged commit 6b5f430 into DynamoDS:master Dec 4, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants