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

Rename labelOptions to tooltipOptions #511

Open
schloerke opened this issue Apr 3, 2018 · 6 comments
Open

Rename labelOptions to tooltipOptions #511

schloerke opened this issue Apr 3, 2018 · 6 comments

Comments

@schloerke
Copy link
Contributor

With the adoption of Leaflet.label into L.tooltip, if we'd like to copy the names fully, we should rename labelOptions (function and argument usage) to tooltipOptions.

This will probably involve deprecation / message functionality within the package.

Or (current implementation) we could leave as is and not change our api, but just point to the documentation of tooltip options from our labelOptions documentation.

#' label options; see \url{http://leafletjs.com/reference-1.3.1.html#tooltip-option}

@MatthiasHinz
Copy link

I would suggest to also add (mention) the 'sticky'-parameter within the label option documentation. In the previous version, it was the default that the tooltip of a polygon follows the mouse cursor. Now it must be activated via sticky = TRUE.

@schloerke
Copy link
Contributor Author

@MatthiasHinz Was sticky=TRUE the default behavior before? I can not find it in the codes for Leaflet.label or leaflet.js. If so, should it be the default behavior still? (So I can document properly)

@tim-salabim
Copy link
Contributor

The behaviour of the tooltip following the mouse was the default behaviour in the leaflet R package before. I don not know whether it also was in leafletjs. See also my comment here - bullet 3. In my opinion it make more sense for the tooltip to be displayed at the mouse cursor than at some location representing the "center" of a feature.

@schloerke
Copy link
Contributor Author

schloerke commented Apr 6, 2018

I completely agree with following the mouse vs "center" for a default. The jarring feeling I get when it doesn't show up at my mouse is worth going against the default leaflet.js setting.

@tim-salabim Should the sticky=TRUE be added to labelOptions as a default option? This would effectively keep it as it was in prior leaflet.R version

@tim-salabim
Copy link
Contributor

Yes, i think that is a good idea.

@schloerke
Copy link
Contributor Author

sticky=TRUE implemented in #520

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

No branches or pull requests

3 participants