* 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.
Fix#5373.
- Remove references to removed file "../../build/deps.js"
- Update leaflet-include.js to point to "../dist/leaflet-src.js"
- Update watch to use the same destination file as rollup (dist/leaflet-src.js)
- Define getRandomLatLng where used
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.