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

Check for both points when moving within viewport #15

Merged
merged 3 commits into from
Nov 13, 2024
Merged

Conversation

kelindar
Copy link
Owner

This pull request fixes a bug when the update isn't correctly fired when entering the viewport from one side. This is due to the contains check that wasn't checking properly for both before/after points.

Simplification and Refactoring:

  • Removed redundant at parameter in writeTile, mergeTile, Add, Del, and Move methods in grid.go. [1] [2] [3] [4] [5]
  • Simplified the Observers method in Tile to improve readability and efficiency.
  • Removed redundant at and locs parameters in Notify1, Notify2, Each1, and Each2 methods in view.go. [1] [2]

Test Suite Enhancements:

  • Added a new test TestView_Updates to cover various edge cases for the Move method in view_test.go.
  • Removed commented-out test TestObservers to clean up the test suite.

@kelindar kelindar merged commit 49965c4 into master Nov 13, 2024
3 checks passed
@kelindar kelindar deleted the movetests branch November 13, 2024 17:43
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