Closed paul121 closed 3 years ago
Good idea!
I wonder if it might also be helpful to have some sort of indicator which pops up on the map on mouse enter when it's inactive. Perhaps just some animated text that slides up and says "Click to interact" or something like that.
FWIW, I am not using this feature/behavior (I believe it's added in the farmOS codebase) in Field Kit. Instead I'm keeping maps purely static (ie, no interactions enabled), unless they occupy the full window, then you can zoom, pan, etc all you like w/o having to click to activate.
I like this idea a lot. And @jgaehring's idea to show text of some sort.
Before thinking about that, though, I'd like to think about what exactly the problem(s) are and what the expected behavior is.
@paul121's last sentence hits the nail on the head, I think:
why it is only interactive the "second" time they try
This specifically points to the "drag pan" requiring an extra click as the core problem. I don't think the "scroll zoom" requiring a click first is necessarily a problem. In fact the reason we made this change in the first place was to prevent scrolling the map when you are trying to scroll the page.
There is actually an issue for the drag pan piece of this specifically: https://github.com/farmOS/farmOS-map/issues/48
That was closed with a very rough workaround, but perhaps it should be reopened and a proper solution should be implemented to prevent focus being required for the "drag pan" interaction.
And if that solves the core issue, then maybe we don't need to highlight the map? What do you think?
I reopened #48.
If you think that would obviate the need for highlighting the map, then feel free to close this.
but perhaps it should be reopened and a proper solution should be implemented to prevent focus being required for the "drag pan" interaction.
That seems like a good solution.
Still curious if highlighting would be good for zooming. As an "advanced" user, I'm probably not the best to provide that feedback.. let's close and reconsider if someone else has issues with zooming.
I reopened #48.
After giving this some more thought, I'm second guessing it. See comment in #48: https://github.com/farmOS/farmOS-map/issues/48#issuecomment-590905059
Reopening this for further consideration.
The Claro and Gin themes in farmOS 2.x style ALL active
elements with a highlighted border. Maybe the app using farmOS-map should be responsible for this behavior. If farmOS-map were to implement something, it might be conflicting with the style in the context of the other application.
I'm going to close this issue and open another feature request for what @jgaehring suggested:
Perhaps just some animated text that slides up and says "Click to interact" or something like that.
A simple way to indicate that the map must be "active" before dragging & zooming might be to "highlight" the container when it is active. Just as when you click in a text field in an HTML form. Might be enough to convey to users why it is only interactive the "second" time they try