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

Zoomed view of the 2D board can hide the spot of interest #18

Open
GNiklasch opened this issue Feb 13, 2018 · 3 comments
Open

Zoomed view of the 2D board can hide the spot of interest #18

GNiklasch opened this issue Feb 13, 2018 · 3 comments
Labels

Comments

@GNiklasch
Copy link

A minor thing in the ease-of-use department...:

Scenario: Playing Formic Functions with default settings (2500x1000 arena shown in 2D) in a browser window not quite as wide as the arena is (Safari 11.0.3 on macOS).

When the mouse pointer is in the right half of the arena/board, the zoomed view is displayed flush left with the left edge of the board, and it is less than half as wide as the board: Works fine.

When the mouse pointer is in the left half of the board, the zoomed view is displayed, not flush with the right edge, but closer to the middle of the board. When the point of interest
(and thus the mouse pointer) is itself near the middle of the board in the left-right direction, the zoomed view will pop up so as to cover it, and it pops down again at the slightest mouse jiggle. Moreover, it seems not to be possible to pin the zoomed view to such a point of interest, I guess because the click requesting to do so ends up in the zoomed view instead of in the board which is momentarily hidden under it.

@davidje13 davidje13 added the bug label Feb 13, 2018
@davidje13
Copy link
Owner

davidje13 commented Feb 13, 2018

Looks like 2 issues here.

  • It decides which side to show the zoomed view based on whether the mouse is left or right of the centre of the board, rather than the centre of the window.
  • The zoomed view is positioned absolutely, but should probably have a fixed position on the screen (sticky should be able to make it stick to the left/right while still being able to scroll vertically)

Even with that fix, once the window gets small enough it will still be an issue.

As for being able to click-to-pin, I think your analysis is correct. Unfortunately it can't be marked with pointer-events: none since the zoomed view has tooltips on the ants. I'll have a think on what can be done there.

@GNiklasch
Copy link
Author

Methinks a sticky view would actually make it worse - the same issue could then occur when the zoomed view is on the left.

Alternatively, how about keeping the zoomed view in one of two fixed absolute positions, deciding (as now) which one to use based on where the mouse is WRT to the centre of the board, and moving the righthand position of the view to align with the right edge of the board, regardless of the window width?

When I've scrolled to show the left board edge, and have the mouse on the left, the zoomed view would then pop up on the right partially hidden under the window edge. But that's OK and consistent: it would mirror what happens on the left when I've scrolled the other way.

The important thing (to me) is that the zoomed view should never cover that spot on the board where the pointer is. I need to see enough context around the pointer when I'm trying to find the best focal point to zoom into. And when the pop-up doesn't obscure the pointer location, click-to-pin will also work.

(There'll still be a problem when the zoomed view is square and the arena is less oblong -- width less than twice the height... But this is no concern for me. I'm not trying to play Formic Square :) .)

@davidje13
Copy link
Owner

That sounds reasonable. Easier to do than my proposed fix too!

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

2 participants