Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix move view subscribers #11

Merged
merged 2 commits into from
Nov 8, 2024
Merged

Fix move view subscribers #11

merged 2 commits into from
Nov 8, 2024

Conversation

kelindar
Copy link
Owner

@kelindar kelindar commented Nov 8, 2024

This PR fixes the issue of Resize() view, when in certain scenarios the subscribers weren't properly updated (either subscribe or unsubscribe). Also Rect API has changed, it is now exclusive of the bottom-right boundary to align with more widely adopted approaches.

View Enhancements:

  • Enhanced View functionality by adding a MoveTo method and refining the Resize method to handle view changes more efficiently in view.go.
  • Updated view_test.go to include new test cases for MoveTo and adjusted existing tests to reflect changes in View behavior. [1] [2] [3]

Rect Enhancements:

  • Improved Rect API by modifying Contains, Intersects, and Size methods to be value receivers and added new methods like IsZero and Difference for better rectangle operations in point.go.
  • Refactored Within and WithinRect methods of Point to utilize the new Rect methods.

Dependency Updates:

  • Updated Go version to 1.23 and upgraded dependencies github.com/kelindar/iostream to v1.4.0 and github.com/stretchr/testify to v1.9.0 in go.mod.

@kelindar kelindar merged commit 35df394 into master Nov 8, 2024
2 checks passed
@kelindar kelindar deleted the moveview branch November 8, 2024 14:06
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