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

Component queries are not really correct #42

Closed
io7m opened this issue Nov 26, 2023 · 1 comment
Closed

Component queries are not really correct #42

io7m opened this issue Nov 26, 2023 · 1 comment
Assignees
Labels

Comments

@io7m
Copy link
Member

io7m commented Nov 26, 2023

In SyWindowViewportAccumulator, the accumulate method assumes that negative offsets are invalid, and it clamps them. Scroll panes use negative offsets inside viewports. This test fails immediately:

  @Test
  public void testNegativeOffset()
  {
    final var accum =
      SyWindowViewportAccumulator.create();

    accum.reset(300, 300);
    accum.accumulate(PAreasI.create(-100, -100, 200, 200));

    assertEquals(-100, accum.minimumX());
    assertEquals(-100, accum.minimumY());
    assertEquals(100, accum.maximumX());
    assertEquals(100, accum.maximumY());
  }
@io7m io7m added the bug label Nov 26, 2023
@io7m io7m self-assigned this Nov 26, 2023
io7m added a commit that referenced this issue Dec 3, 2023
Explicitly require all components to have a screen reference. This
allows them reliable access to various services at all times.

Implement multi-line text views with selection.
Implement scrollable text areas.

Affects: #42
Affects: #14
Affects: #13
@io7m
Copy link
Member Author

io7m commented Dec 3, 2023

This is now fixed.

@io7m io7m closed this as completed Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant