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

Replace native HTML tooltip for custom POIs with Leaflet Tooltip #415

Merged
merged 1 commit into from
May 14, 2021

Conversation

mjaschen
Copy link
Contributor

  • the tooltip shows instantly when hovering a POI icon with the mouse cursor
  • the content is the same as for the popup, except for the action button (“delete”) as the button isn't reachable by the mouse (the tooltip disappears when the mouse cursor leaves the icon area)
  • (maybe we should add a hint to the tooltip, e.g. “Click icon for actions” (TBD))
  • the tooltip is only attached to POI icons on devices without a touch interface, i. e. when BR.Browser.touch is false
  • the tooltip is removed when the icon is clicked, otherwise tooltip and popup would be visible at the same time
  • the tooltip is enabled again after the popup was closed

(I found no obvious solution for showing tooltips on the Overpass Layer icons yet)

- the tooltip shows instantly when hovering a POI icon with the mouse cursor
- the content is the same as for the popup, except for the action button (“delete”) as the button isn't reachable by the mouse (the tooltip disappears when the mouse cursor leaves the icon area)
- (maybe we should add a hint to the tooltip, e.g. “Click icon for actions” (TBD))
- the tooltip is only attached to POI icons on devices without a touch interface, i. e. when `BR.Browser.touch` is `false`
- the tooltip is removed when the icon is clicked, otherwise tooltip and popup would be visible at the same time
- the tooltip is enabled again when the popup is closed
Copy link
Owner

@nrenner nrenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, thanks.

@nrenner nrenner merged commit 7850e97 into nrenner:master May 14, 2021
@nrenner nrenner added this to the 0.17.0 milestone Jun 2, 2022
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.

2 participants