Skip to content

Refactor socket repositioning logic for relative positioning on resize#90

Open
KrishGaur1354 wants to merge 1 commit into
FOSSEE:masterfrom
KrishGaur1354:fix/undoredo
Open

Refactor socket repositioning logic for relative positioning on resize#90
KrishGaur1354 wants to merge 1 commit into
FOSSEE:masterfrom
KrishGaur1354:fix/undoredo

Conversation

@KrishGaur1354

Copy link
Copy Markdown
Contributor

This pull request refines the way sockets are repositioned when a graphical component is resized, improving the accuracy of their placement and preventing drift as the component grows. The new approach ensures that each socket's center remains at the same relative position within the component, rather than scaling from the top-left corner.

Improvements to socket repositioning logic:

  • Updated the _reposition_sockets method in Graphics.py to keep each socket's center at the same fractional height of the component after resizing, minimizing drift and maintaining visual alignment.
  • Added detailed comments explaining the rationale for centering sockets and the calculation method for their new positions.

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.

1 participant