* Test(MapDragSpec): add mouse drag with CSS scaled container
This test is failing as of this commit.
* Fix(Draggable): measure drag compensating for CSS scale
so that the computed offset (i.e. user drag length) is divided by the CSS scale applied on the `_element`'s container. Later on when `Draggable` updates the `_element`'s position, the latter is affected by the CSS scale by the browser.
Added a `getSizedParentNode` function in `DomUtil` in order to automatically retrieve the closest parent node in the DOM hierarchy tree that has a non null size (so that we can compute the scale in `DomEvent.getMousePosition`), without having to specify the parent node explicitly (which is ugly).
* Fix(getMousePosition): getBoundingClientRect is in page scale
therefore it must also be divided by the container scale in order to compute the relative position of the event in the scaled container.
* Test(MarkerDragSpec): add drag with CSS scaled container
this should pass automatically at this commit, thanks to the previous modification of Draggable.
* Debug(map-scaled): add draggable marker
as well as another CSS scaled wrapper, plus some border and padding, and debugging console logs, to make sure the computations of `getMousePosition` are correct (correctly removing the border width, and compensating for CSS scale).
* Docs(getMousePosition): explicitly exclude border
* Docs(DomUtil): add return value of getSizedParentNode
was missing in docstring.
* Feat(DomUtil): add getScale function
so that it can be used by DomEvent.getMousePosition and Draggable.
* Refactor(Draggable): cache container scale
to avoid triggering browser reflow continuously during _onMove, but only on drag start (_onDown).
By compensating for the scale within Draggable instead of delegating to DomEvent.getMousePosition, it also becomes possible to check first for the clickTolerance, so that we prevents user's small movement based on screen, irrespective of rendered scale.
* Test(Map+MarkerDrag): remove scale on initial movement
that is intended to overcome Draggable clickTolerance, since now it is based on screen pixels, irrespective of applied CSS scale on the map.
Thanks to the tolerance in the expected final position, this has no effect on the result of the test, even though the overall drag is now slightly shorter.
* Refactor(DomEvent): use DomUtil.getScale in getMousePosition
to factorize scale computation (also used within Draggable).
* Fix(TileLayerWMS): get rid of L.TileLayer global call
and rely on imported TileLayer instead.
* Fix(Canvas): get rid of L.stamp global call
and rely on imported Util.stamp instead.
* run `docs` via npm
* add shebang line to integrity.js, so npm will resolve node binary automatically
* remove unnecessary build-jake npm script
* add test.js script as replacement of Jakefile.js
* remove Jakefile, remove jake from devDependencies
* update docs
* move scripts to separate directory
* change shebang line from nodejs to js
* change shebang line from js to node
* update docs
* use Karma cli instead of custom test script
* add pretest and test-nolint scripts, remove lint scripts from travis.ci
Run linting scripts in pretest script, this way test script will automatically trigger code linting.
Add test-nolint script to have possibility to run tests without triggering pretest script with linting. This is useful when running tests in different browsers and tere's no sense to lint code more than one time
* replace shebang lines with node executable in npm scripts
* remove note about nodejs symlink in CONTRIBUTING.md
Fixes#6030: Cancel animation frame request before removing the map.
This fixes the bug where the the delayed call to _redraw is trying to get the drawing context which has already been destroyed.
* remove sinon from repo and add sinon and karma-sinon devDeps
* remove expect from repo and add karma-expect to devDeps instead
* fix path to sinon and expect in html file for browser testing
* include leaflet-src directly from dist instead of symlink pointing to it
when passing `crossOrigin: ''` (empty string) option, the `crossorigin` attribute should also be set an empty string value (valid keyword, with same effect as `"anonymous"` value). Need to add this test, because in JavaScript the empty string is a falsy value that could have been caught as `false` and led to no `crossorigin` attribute set.
* Test(ImageOverlay): crossOrigin option to IMG crossorigin attribute
typical values: false (default), true => '', <string> => <string>
now that a string value can be passed to this option.
* Test(TileLayer): crossOrigin option to IMG crossorigin attribute
typical values: false (default), true => '', <string> => <string>
now that a string value can be passed to this option.
* Style(TileLayerSpec): remove commented code
* Style(TileLayerSpec): remove more commented code
* Added support for crossorigin using a String besides a Boolean (typically set `crossOrigin: 'use-credentials' / 'anonymous' / '' / true / false (default))
* Changed boolean to result in empty string and updated docs
so that it is more obvious what the difference is between the base map, the labels, and when both are stacked.
The chosen tile is similar to the initial view of the result example below (example.html), and contains many labels.
by Benjamin Becquet, who already submitted a few plugins on this list and mentioned this one in https://github.com/Leaflet/Leaflet/issues/143
Added into "Overlay Display > Markers & renderers" section.
following issue #6004 (fixed by PR #6006).
Added 2 dedicated tests.
Unfortunately I could not add a test for detectRetina option that easily, because since the move to Rollup, Browser values became internal variables, and overriding them later on does not have any effect on Leaflet internal references… Not sure how to workaround this for the sake of testing.
* update changelog
* add blog post
* update reference
* update download page
* update version in config.yml
* update announcement
* point reference.html to 1.3.1 docs
Also add reference-1.3.1.html, which redirects to 1.3.0 docs
* update integrity hashes
* redirect reference.html directly to 1.3.0 to avoid double redirect
* add a plugin
* Correct the demo address of the plugin
* Correct the demo address of the plugin
(The link does not work (404 error). Most probably the trailing slash (/) should be removed.)
* Update plugins.md
remove the mistake (<te) at line 1045
* correct plugin name
change marker-drection to marker-direction( miss i in word 'drection')
* Update plugins.md