* 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
This adds the other secondary headers in the Contributing document to the Table of Contents at the top. I have kept the depth at what it was - this just adjusts the oversight of other sections.
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".
The markup renderer will still literally render html tags inside "pre" and "code" unless they're escaped. The result was that the example code would be rendered as:
var baseMaps = {
"Grayscale": grayscale,
"Streets": streets
};
rather than
var baseMaps = {
"<span style='color: gray'>Grayscale</span>": grayscale,
"Streets": streets
};
because the "Grayscale" text would be literally styled as a span with gray color, and then recolored by the syntax highlighter.
Escaping the span tags fixes this.