Iván Sánchez Ortega
66cf6a0ea1
Take devicePixelRatio into account for scrollwheel zoom in win10+chrome ( #5480 )
2017-04-27 16:47:11 +02:00
Iván Sánchez Ortega
b19893c9ba
Add hook points to allow for a proper NoGap plugin ( #5476 )
2017-04-27 15:38:55 +02:00
Iván Sánchez Ortega
7e1740ecdf
Better sanity checks for avoiding loading infinite tiles ( #5479 )
...
* Sanity check to prevent loading tiles when bounds are `Infinity`
* Make linter happy
* Better sanity checks for avoiding loading infinite tiles
* typo
2017-04-25 15:00:47 +02:00
Iván Sánchez Ortega
6d6b07612e
Sanity check to prevent loading tiles when bounds are Infinity
( #5478 )
...
* Sanity check to prevent loading tiles when bounds are `Infinity`
* Make linter happy
2017-04-25 14:31:27 +02:00
Patrick Paskaris
8e96ac476d
Fix box zoom race condition ( #5452 )
...
* 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
2017-04-20 15:57:17 +02:00
Oliver Heilig
1318b999ef
On update set current tiles active to avoid pruning ( #5381 ) ( #5431 )
...
* On update set current tiles active to avoid pruning (#5381 )
* fix for missing tiles - without flickering (#5381 )
2017-04-20 14:19:26 +02:00
Luis Camacho
b9df865730
make L.Mixin.Events a simple object instead of a prototype so it doesn't have a 'constructor' property. fixes #5451 ( #5453 )
2017-04-20 12:45:33 +02:00
Guillaume P
ac05f68a39
Canvas: call ctx.setLineDash in _fillStroke ( #5454 )
...
* 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
2017-04-20 12:41:26 +02:00
Luis Camacho
ff72181b52
Fix __super__ by not copying it from the parent when subclassing ( #5456 )
2017-04-20 12:39:49 +02:00
Mstislav Zhivodkov
cbaf02034c
Remove global L usage ( #5463 )
2017-04-20 12:38:28 +02:00
Per Liedman
da4e6c1c5e
Only rearrange DOM in toFront/toBack if needed ( #5465 )
...
Addresses problem where Internet Explorer re-fires mouseover if
the element is re-appended to the DOM.
Fixes #4050 .
2017-04-18 16:09:19 +02:00
Mirodil
458b7177b2
Push back keyboard navigation order of L.Popup's close button ( #5461 )
...
* Web accessibility
so tabbing through the page make the link(in the popup) to the first entry focussed before the 'x' for close
* remove spaces
2017-04-18 15:12:00 +02:00
gatsbimantico
cc4dce13d0
Issue #5118 Fix documentation for method setZoom
2017-04-17 19:17:33 +01:00
qjas
3e000fbe9d
Remove spurious check in DomUtil.preventOutline ( #5435 )
...
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".
2017-04-05 12:12:56 +02:00
Iván Sánchez Ortega
61ff641951
Add new class L.VideoOverlay ( #4988 )
...
* Add VideoOverlay class based on ImageOverlay
* Make linter happy
* Move VideoOverlay include to layer/index
* Fix mapbox tokens
2017-04-04 22:45:09 +02:00
john gravois
48a76bc6fd
jsdoc DomUtil.TRANSITION_END
2017-03-30 17:34:51 -07:00
Iván Sánchez Ortega
28a0adc132
Ensure renderer's container is init'ed when a path is added to map ( #5404 )
2017-03-29 09:52:43 +02:00
Dave Leaver
27263b7afa
Control.Layers: Only add layer events to layers when we are on the map. Fixes #5421 ( #5422 )
2017-03-28 23:10:29 +02:00
Tom Salisbury
96cfdd3a3d
Added z-index support to ImageOverlay ( #5418 )
2017-03-28 10:54:24 +02:00
Tom Salisbury
8278ed393d
Added error event to ImageOverlay layer and added tests for the new ( #5416 )
...
event and existing error handling. Also added missing
documentation for the load event.
2017-03-28 08:54:26 +02:00
ghybs
06ed42ad2c
Docstrings: LayerGroup.hasLayer add method call with id ( #5411 )
...
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.
2017-03-27 09:35:05 +02:00
Per Liedman
d3c7ed13ad
Stop map on drag start instead of pointer down ( #5378 )
...
* Stop map on drag start instead of pointer down; fix #5350
* Remove unused _onDown event handler
2017-03-08 15:41:02 +01:00
Per Liedman
c18ac11efb
Include L.Mixin.Events again; add deprecation notice ( #5365 )
...
Close #5358
2017-03-07 09:53:24 +01:00
Anant Prakash
da1a89871d
Error handler in ImageOverlay for 404 links ( #5307 )
...
* Added Error handler in L.ImageOverlay._initImage
* fixed syntax
2017-03-02 13:28:52 +01:00
Lewis Christie
0ed260c847
fix invalid geoJSON produced by nested LayerGroups ( #5359 )
2017-03-02 13:21:56 +01:00
Iván Sánchez Ortega
01e0640335
Docstrings: recover lost docstring for L.Util.lastId ( #5352 )
2017-02-21 14:52:17 +01:00
ghybs
9e4f79d1e5
Fix( #5328 ): Layers Control can now become scrollable even if collapsed: false ( #5348 )
...
* Fix(#5328 ): Layers Control scrollable even if collapsed: false
the `expand()` method was called only when expanding the Layers Control through user action.
In the case of option `collapsed: false`, no event listener is attached (no user action expected to expand), therefore the control height is no longer adjusted compared to map container's height, whereas the only time it is done is at initialization, when the control is not yet inserted into the DOM, hence it does not have an actual height to check against.
Therefore added a hook on `addTo()` in order to run `expand()` AFTER the control has been insterted into the DOM.
The same issue happens when later adding more base layers / overlays to the Layers Control: it not collapsed, we should run again the height check (e.g. through the `expand()` method) to make sure we make it scrollable if necessary.
Therefore called `expand()` after each `_addLayer()`.
Actually checking first if the control is on map and if option `collapsed: false` in order to prevent calling `expand()` for nothing.
* Test(ControlLayers): 2 tests for collapsed: false being scrollable
(for issue #5328 ).
CAUTION: unlike most other tests, had to actually insert the map container into the DOM (i.e. `document.body`) for these tests to be useful, otherwise the height remains at 0.
This may lead to memory leak and tests hanging if done on too many tests (see Leaflet.markercluster tests issue, e.g. https://github.com/Leaflet/Leaflet.markercluster/pull/577 )
2017-02-21 14:33:01 +01:00
Denis
643ca522c1
Export lastId in Util ( #5349 )
...
Looking over at the documentation I noticed that `lastId` was an available property however it wasn't exported.
http://leafletjs.com/reference-1.0.3.html#util-lastid
2017-02-21 13:37:57 +01:00
Joachim Kuebart
29375b4b9c
ES6ify: Provide missing SVG static methods. ( #5330 )
2017-02-14 19:39:57 +01:00
Iván Sánchez Ortega
c856c6090f
Do not stop keypress on escape if no popup is open
2017-02-14 13:15:50 +01:00
Iván Sánchez Ortega
b997839fe7
Docstrings: map.panBy has options
2017-02-14 12:08:13 +01:00
Simon Legner
c5f7dc4ad3
ES2015 modules: Add index.js files to subdirectories/namespace ( #5329 )
...
* Add index.js files to subdirectories/namespace
This allows to streamline the import/export in the main file.
* Fix tests by switching to karma-rollup-plugin
2017-02-13 14:14:00 +01:00
Joachim Kuebart
1010451a66
Pull min/maxNativeZoom from TileLayer into GridLayer, as per #5316 . ( #5319 )
...
* Pull min/maxNativeZoom from TileLayer into GridLayer, as per #5316 .
* Add a couple unit tests for GridLayer's maxNativeZoom
2017-02-09 10:33:43 +01:00
Per Liedman
689b71e280
Disable click propagation on zoom control buttons ( #5318 )
...
Close #5308 .
2017-02-08 13:02:10 +01:00
Madis Allikmaa
59298a72d0
Docstrings: Fix popup "autoClose" and "closeOnClick" options, fixes #5040 ( #5304 )
...
* Fix popup "autoClose" and "closeOnClick" options documentation, fixes #5040
* Docstring for Popup `closeOnClick` option
* Backticks on docstrings
2017-02-07 16:24:36 +01:00
Miguel Andrade
ad75456fa5
add margin to LatLngBounds.equals method ( #5071 )
...
* add margin to LatLngBounds equals method
* add tests
2017-02-02 16:55:30 +01:00
Iván Sánchez Ortega
53e90945aa
add L.Draggable options and fix docstring ( #5301 )
2017-02-02 16:46:58 +01:00
Iván Sánchez Ortega
ddc3a9ca61
Fix max/min calculation for getBoundsZoom ( fixes #5136 ) ( #5137 )
...
* Fix max/min calculation for getBoundsZoom (fixes #5136 )
* Added test for inside param of L.Map.getBoundsZoom()
2017-02-02 16:21:10 +01:00
Iván Sánchez Ortega
14c5f1602c
Scrubbing of detached DOM elements, prevents memory leaks ( #5265 )
...
* Scrubbing of detached DOM elements, prevents memory leaks and fixes #5263
* Make linter happy
2017-02-02 10:57:57 +01:00
Dave Leaver
5603a87c70
Remove marker.dragging when not on the map ( #5295 )
...
* Add some tests for #5293
* Fix enabling marker dragging while markers aren't on the map by removing the dragging object when not on the map.
This is a change of behavior (.dragging is only defined when a marker is on the map).
* Docs for dragging change
2017-02-02 10:14:39 +01:00
Iván Sánchez Ortega
f4456b7a9a
Stop scroll propagation in L.Layers.Control in chrome>55 ( #5280 )
2017-02-01 11:08:24 +01:00
Dave Leaver
4921355195
Fix a few uses of children that should be child in comments ( #5294 )
2017-02-01 09:33:09 +01:00
Vladimir Agafonkin
703ae02aa8
ES6 modules & Rollup ( #4989 )
...
* WIP ES6 modules & rollup
* WIP ES6 modules & rollup 2
* WIP ES6 modules & rollup 3
* WIP ES6 modules Browser
* WIP ES6 module fixes
* WIP ES6 modules: simpler browser exports
* WIP ES6: refactor CRS/Projection modules, CRS obj -> CRS.Base
* get rid of unnecessary index.js
* WIP ES6 modules, dom events and stuff
* Make linter happy, rollup to dist/
* revert to CRS namespace/class for now
* WIP rollup: export more stuff
* export controls
* rollup: export Layer
* rollup: export DomEvent
* rollup: export more layer types
* rollup: export Popup/Tooltip
* WIP: ES6-ify marker, icon, domutil, draggable.
* ES6-ify gridlayer, tilelayer.
* ES6-ify: Tweak imports-exports, code is now runnable!!
* ES6-ify: Fix scope in some DomUtils
* ES6-ify: Path, fix Popup
* ES6-ify: Lint & cleanup
* ES6-ify map handlers, more linting
* ES6-ify: Icon.Default namespacing
* ES6-ify: Renderers, CircleMarker
* ES6-ify: Circle, Polyline, LineUtil
* ES6-ify: Polygon, Rectangle, LineUtil, PolyUtil, linting
* ES6-ify: SVG.VML
* ES6-ify: DomEvent.Pointer, DomEvent.DoubleTap
* ES6-ify: Linting, make Karma play nice with Rollup
* ES6-ify: More work on fixing bits breaking some unit tests.
* ES6-ify: rollup the version number, fiddled with build scripts
* ES6-ify: Fiddle with test scripts
* ES6-ify: cleanup (refs to global L, imports from (DOM)Util), prevent cyclic loop on Map imports
* ES6-ify: More cleanup of (DOM)Util/Browser/DomEvent imports
* ES6ify: Use rollup's "legacy" option for ES3 (IE8) builds
* ES6-ify: Clean up build scripts, fix CONTRIBUTING.md instructions
* Typo
* ES6-ify: minor fixes and lefovers after rebasing on top of 1.0.2
* ES6-ify: upgrade to rollup 0.38 for proper IE8 builds, fix L.SVG.VML
* Make linter happy.
* ES6: Fixing typos and sxrew-ups after big rebase
* Fix symlink for debugging scripts
* ES6: Cleanup old build scripts
* ES6-ify: Update build system to include git rev in L.version
* ES6-ify: re-enable unit tests replacing L.Path with L.Polyline
* Export Path
* ES6ify: cleanup old banner file
* ES6-ify: whitespace in var declarations
* ES6-ify: Export toTransformation as L.transformation
* ES6-ify: cleanup L.transform exports
* ES6-ify: "import Util" in Transformation and SVG.VML
2017-01-30 11:35:16 +01:00
Markus
3ac37c29a4
Add L.transformation factory, allow creation from array ( #5282 )
...
* added transformation getter
* fixed lint, added editorconfig
* added CRS.Simple transformation values again
* removed editorconfig
2017-01-30 09:43:50 +01:00
Iván Sánchez Ortega
1cc4660d98
Changelog for 1.0.3, version bump. ( #5274 )
...
* Changelog for 1.0.3, version bump.
* Fix 1.0.3 release date
2017-01-23 12:16:07 +01:00
Per Liedman
67f12ee6e9
Avoid multiple canvas updatePaths/redraws during viewreset ( #5250 )
...
* Avoid multiple canvas updatePaths/redraws during viewreset
Close #5170 .
* Fix code style
* Add a code comment
2017-01-23 11:06:03 +01:00
Iván Sánchez Ortega
2b5d401976
Another blind attemp to work around dblclicks on Edge ( #5268 )
...
* Another blind attemp to work around dblclicks on Edge
* Make linter happy, do not forget about IE11 & IE11 pointer events
2017-01-23 10:56:08 +01:00
Reinier Battenberg
af72aa7647
IE8: Remove trailing comma in L.Layer options ( #5270 )
...
The trailing column in the Layer default Options Object definition crashes IE8.
2017-01-19 16:55:43 +01:00
Iván Sánchez Ortega
ad271063a4
Docstrings: clarify L.Browser.Touch (see #5266 )
2017-01-19 09:33:57 +01:00
Mariano Carballal
7f11fdfbae
Add alternative text to marker shadows ( #5259 )
2017-01-17 20:26:44 +02:00