* Docs(GridLayer): more explicit updateWhenIdle option
description, because "for better performance" is quite generic and might be understood in very different manners depending on the reader's point of view.
* Docs(GridLayer): improve updateWhenIdle option explanation
as per Perliedman's proposal.
* Docs(Marker): explain checks for re-using icon element
when the marker is modified with an icon of the same type (i.e. an image icon with an image icon, or a DivIcon with a DivIcon), or checks for NOT re-using the icon element when modifying with an icon of a different type (i.e. an image icon with a DivIcon, or the reverse).
* Revert "Div icon accept node element as option (#5517)"
This reverts commit ba7bfb5011.
Conflicts:
spec/suites/layer/marker/MarkerSpec.js
* Docs(Map/Grid+TileLayer): improve minZoom and maxZoom explanations
so that it is more explicit how Map's options may get automatically computed from its Grid/Tile layers, and what is the exact effect of these options on Grid/Tile layers.
* Docs(Map/Grid+TileLayer): use "inclusive"
instead of "included".
https://en.wiktionary.org/wiki/inclusive
* Using proper minus character in the zoom control which means CSS workaround isn't needed
* Using HTML escaping of unicode minus character for added browser support
* Don't turn enter keypress into clicks on map
But still preserve functionality to open marker's popup through
enter keypress when focused.
Fixes#5499.
* Clean code
Thanks @egoroof
* Change name of keypress handler to _onKeyPress
* Add unit test
* Fix for issue #5116
As this filters out custom inputs created from property names (supposedly using innerHTML), they still will become unusable whenever _update() is fired on control.
I believe that this is a different issue coming from design of a module.
* Followup fix for #5116
* Add precision parameter to all toGeoJSON functions
* Replace usage of toPrecision with Utils.formatNum
* Always default to six decimal places
* Fix docs
* Allow precision of 0
* Docs(Marker): modify icon option description
To explain that a _common_ / generic instance of `L.Icon.Default` is used, instead of leaving room to think that a _new instance_ of `L.Icon.Default` is created for every Marker without specified `icon` option.
See https://github.com/Leaflet/Leaflet.markercluster/issues/786#issuecomment-302893446
* Docs(Marker): replace icon class by instance
it actually needs a proper _instance_ of `L.Icon`, not a "class".
* Added option to allow DOM elements inside a DIV icon
* Removed white line
* Adapted so that the dom element can be passed with the html option
* Update DivIcon.js
Changed documentation to state HTMLElement
* Feat(Bounds): add getTopLeft & getBottomRight methods
as suggested in #5475, for consistency with `LatLngBounds` methods which already provide methods for the 4 possible corners.
Also include the docstrings.
* Docs(Bounds): add comments to identify corners
in BoundsSpec.
* Test(Bounds): add tests for existing corner methods
namely getBottomLeft and getTopRight.
Checked that expecting different values make the tests fail.
* Test(Bounds): add spec for 2 new corner methods
namely getTopLeft and getBottomRight.
Closes#5475 together with previous PR #5487.
* Refactor(Bounds): return this.min(max) instead of new Point
as TopLeft corner is tha same as this.min (BottomRight same as this.max).
* Docs(Bounds): add links to this.min(max)
to make it clearer that these methods are just shorthands to already available properties.
Furthermore, it implies that they output those properties directly, making a clue for the app developer that if he/she wants to modify them, they should be cloned before doing so in order to prevent unintentional behaviour.
as suggested in issue #5475.
The actual relative position of the given corners do not matter for the factory / constructor current functionality: it just determines the min/max coordinate values.
* Fix box zoom race condition
The deferred call to `_resetState` can interrupt the next box zoom if
the user initiates it before the timeout fires. This causes the mouse
move handler to create a second box zoom element, orphaning the first
one and leaving it in the DOM.
* Extract duplicate code into private method
* Canvas: call ctx.setLineDash in _fillStroke
This make dashArray working properly for cirles.
fix#5182
* Debug: add dashed circle example
* Debug: add simple example reproducing #5182
The codes first execute "element.tabIndex"(show that element is not
NULL), then execute "!element" in the condition of if stmt(check whether
the element is NULL or not). It is a contradiction.
I think since the element must not be NULL(otherwise the execution of
"element.tabIndex" would be wrong) when the while stmt finishes, the
next if stmt doesn't need to check the element like "!element" again.
Checking the element.style is already enough. So remove the "!element".
With the current `hasLayer` code, we can call this method by passing the `_leaflet_id` and get the same result as passing the corresponding layer object.
Added the alternative method call, as done for `removeLayer` method.