Skip to content

Fix move view subscribers#11

Merged
kelindar merged 2 commits intomasterfrom
moveview
Nov 8, 2024
Merged

Fix move view subscribers#11
kelindar merged 2 commits intomasterfrom
moveview

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
@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