Vladimir Agafonkin
01455c0167
Merge pull request #4193 from Leaflet/grid-extra-loads
...
Fix extra tile usage
2016-02-08 16:53:50 +02:00
Iván Sánchez Ortega
c6e2a2021a
Unit tests for flyTo and TileLayers.
2016-02-05 16:30:29 +01:00
Iván Sánchez Ortega
efdc626262
Fix tile pruning on fade-in, pass all unit tests now :-D
2016-02-04 15:19:35 +01:00
Iván Sánchez Ortega
f777f42c6b
More GridLayer unit tests; Grid zoom calculation changed during zoom anims
2016-02-03 17:35:52 +01:00
Iván Sánchez Ortega
bf37a9106c
Change the way GridLayer is reset on a map viewreset
2016-02-02 16:56:18 +01:00
Iván Sánchez Ortega
ed05d4ac1e
Unit tests for GridLayer loading logic
2016-02-02 14:56:02 +01:00
Iván Sánchez Ortega
afd7959959
Make linter happy.
2016-01-18 10:10:32 +01:00
Iván Sánchez Ortega
65ccc2b36c
Fractional zoom controls.
2016-01-18 10:10:32 +01:00
Yohan Boniface
5e6ef5ce12
Consistent GeoJSON casing
...
I've made the choice to:
- switch API and method to upper case version (GeoJSON, geoJSON, toGeoJSON)
- keep internal variable all lower case (geojson), because we usually do not
uppercase variables
Fix #2444
2015-12-25 14:00:21 +01:00
Vladimir Agafonkin
f23074d790
Merge pull request #4040 from Leaflet/gridlayer-pixelbounds
...
Fix GridLayer pixelBounds computation
2015-11-23 23:48:31 +02:00
Yohan Boniface
e2fbe19683
Fix GridLayer pixelBounds computation
...
Map size does not change from one zoom to another, so we dont need
to scale it.
Without this change, we are creating more or less 4x tiles when
zooming in.
There are still cases where we are requesting a bit more tiles than
what I would expect, but I see it also happens on 0.7.3
2015-11-22 23:19:57 +01:00
Vladimir Agafonkin
63f239a20f
Merge pull request #4028 from Leaflet/geojson-setstyle
...
Do not set layer.options a reference to layer.defaultOptions (fix #3990 )
2015-11-18 17:02:46 +02:00
Yohan Boniface
7a1496ea4d
Do not set layer.options a reference to layer.defaultOptions ( fix #3990 )
...
git bisect point at ad9d0f8c7f
2015-11-18 13:29:02 +01:00
Yohan Boniface
d8b7f6fcbe
L.Label: honour opacity option
2015-11-15 19:15:14 +01:00
Yohan Boniface
9d0b13b991
Add some basic unittests for L.Label
2015-11-15 18:56:27 +01:00
Yohan Boniface
fd5411d74b
Fix popup toggle on marker click ( fix #3992 )
...
Issue was:
- popup toggling is made on 'click' event
- map listen to 'preclick' to close any open popup
- at second user click, 'preclick' has been fired, then popup
closed, so the popup toggling was reopening it
- this was not an issue before 0d3448d494
because 'preclick' on the marker was not bubbled to the map
- also the unittest covering this use case was too much coupled with
the use case with calling marker.fire instead of simulating user
click on the marker icon
2015-11-14 20:41:53 +01:00
Yohan Boniface
d901a5fc07
Fix interactive=false not taken into account for canvas ( fix #3946 )
2015-10-19 21:39:04 +02:00
Yohan Boniface
d3198d8d39
Fix duration not passed through from setView to panBy ( fix #3300 )
2015-10-12 14:02:30 +02:00
Vladimir Agafonkin
8a5184193e
Merge pull request #3917 from Leaflet/canvas-stop-event
...
Canvas events fixes (fix #3915 )
2015-10-10 21:24:37 +03:00
Yohan Boniface
6c3b9e10b8
Fix L.Circle init without options.radius
2015-10-09 20:24:42 +02:00
Yohan Boniface
0b0989f9f1
Canvas events fixes ( fix #3915 )
...
- fix fireEvent called for each layer containing event point
- fix layer not removed from this._layer at remove
- fix L.DomEvent.stop(e) not honoured for canvas because events
are both listenned on canvas container and map container
2015-10-09 18:28:35 +02:00
Yohan Boniface
7c2ac9f39d
Make sure mouse has an external relatedTarget on mouseout/over ( fix #3797 #3708 )
2015-10-08 14:57:33 +03:00
Vladimir Agafonkin
8c8d0ac7ee
fix whitespace in comments
2015-09-25 15:37:07 +03:00
Vladimir Agafonkin
cfdbd10431
enforce indentation in specs
2015-09-25 13:55:37 +03:00
Vladimir Agafonkin
301473ad4d
more strict eslinting
2015-09-25 13:40:21 +03:00
Iván Sánchez Ortega
e0aa981818
Merge pull request #3841 from javimolla/fix2990
...
Extract logic from getScaleZoom to CRS
2015-09-19 11:03:00 +09:00
Iván Sánchez Ortega
3924d49bcd
Consistency between L.circle and L.circleMarker ( #3785 )
2015-09-17 23:22:55 +09:00
javimolla
76868ad3f4
Extract logic from getScaleZoom to CRS
...
Added tests for custom crs with zooms not power of two related
2015-09-15 17:58:19 +02:00
Vladimir Agafonkin
08d655fe66
upgrade deps and stricter eslint
2015-09-04 17:46:55 +02:00
Per Liedman
fecd412209
Truncate high/low latitudes for Spherical Mercator like previous versions.
...
Close #3700 .
2015-08-03 21:26:56 +02:00
Fabrizio Minuti
93c2b52604
fix imageoverlay setBound when not added to map
...
If imageoverlay#setBounds is called when the layer is not added to a
map, the _reset method gets errors on execution
2015-07-28 12:10:40 +02:00
Yohan Boniface
08674721bc
Fix baselayerchange event argument ( fix #3677 )
2015-07-27 15:41:07 +02:00
Yohan Boniface
8d980ce49b
Add a unittest to cover dragging map not closing open popup (cf #3632 )
2015-07-16 17:01:44 +02:00
Yohan Boniface
07b7219bc9
Only consider a target if it listens for event type ( fix #3607 )
2015-07-09 23:00:52 +02:00
Yohan Boniface
74018f284e
Add nonBubblingEvents option ( fix #3604 )
2015-07-09 14:12:12 +02:00
Yohan Boniface
50d7121f72
Make _fireDOMEvent accept optional targets
...
In the case of canvas path, we can't add the canvas element itself
as an interactiveTarget, given that it's big like the path bbox, and
thus would make all this bbox target of events (so also clicking
outside of the path itself, the layer would fire click event, for
example)
2015-07-06 13:55:59 +02:00
Yohan Boniface
f4cc307e70
Add preclick related unitest
2015-07-06 13:55:59 +02:00
Yohan Boniface
0d3448d494
Always fire DOM event on the map too
2015-07-06 13:55:59 +02:00
petr
18933e1764
accept geojson with null geometry
2015-07-01 13:28:10 -07:00
Iván Sánchez Ortega
ad08a5c874
Unit test for map zoom level limit and zoom-less setView
2015-06-05 20:51:20 +03:00
Vladimir Agafonkin
fdd60cc66b
ditch viewreset event, reliable zoomend
...
removes viewreset use everywhere; also changes event order to have
zoomend before move and moveend to make zoomend a reliable viewreset
successor
2015-06-04 20:42:28 +03:00
Iván Sánchez Ortega
c0384bbe21
Implement 'overlaps' spatial operator on bounds and use it on gridlayers
2015-06-02 12:35:31 +02:00
Yohan Boniface
298a27fbe4
Add Polyline/Polygon.isEmpty method
2015-05-09 23:03:22 +02:00
Yohan Boniface
426f331874
Fix polygon.addTo(map) failing when latlngs was empty.
...
Since #3279 an empty polygon as a nested array [[]] as latlngs,
so _latlngs.length returns true.
2015-05-09 22:04:46 +02:00
Yohan Boniface
6aca7ef3c2
Add back L.Polyline.addLatLng
2015-05-08 14:53:21 +02:00
Yohan Boniface
2408cf2bb6
_flat is now a static method
2015-05-08 13:11:58 +02:00
Yohan Boniface
8b97b905e8
Merge branch 'master' into nested-polygons
2015-05-08 13:10:49 +02:00
Yohan Boniface
19d6008dfc
Make L.Polyline._flat a static method
2015-05-08 11:52:00 +02:00
Vladimir Agafonkin
6c0557c868
Merge pull request #3386 from Leaflet/polyline-flat
...
Fix L.Polyline._flat returning true for a nested empty array
2015-05-07 11:08:37 +03:00
Vladimir Agafonkin
bb68b7342f
Merge pull request #3390 from Leaflet/latlng-clone
...
Add LatLng.clone
2015-05-07 11:07:21 +03:00
Iván Sánchez Ortega
8f3a353d84
LatLng.wrap shall not drop altitude, closes #3420
2015-04-30 16:38:48 +02:00
Yohan Boniface
8938754bd5
Merge branch 'master' into nested-polygons
...
Conflicts:
spec/suites/layer/vector/PolygonSpec.js
2015-04-21 15:57:24 +02:00
Yohan Boniface
097128cfa7
Add LatLng.clone
2015-04-21 15:52:44 +02:00
Yohan Boniface
003e94ae11
Fix L.Polyline._flat returning true for a nested empty array
2015-04-18 17:41:36 +02:00
Nathan Cahill
794e64df41
add map.setMinZoom() and map.setMaxZoom() closes #3380
2015-04-16 18:39:40 -05:00
Yohan Boniface
3336bcbbe9
Fix Polygon.getCenter returning invalid LatLng when all points in same pixel
2015-04-12 18:43:04 +02:00
Yohan Boniface
a82c80ecd9
Fix Polyline.getCenter returning undefined with very small line
2015-04-12 11:25:46 +02:00
Yohan Boniface
37b87b4b21
Loop through parents when event src element is not in targets
...
For example, when using a DivIcon, we often add DOM elements in it,
which can then be the actual target of DOM events.
2015-04-10 07:59:59 +02:00
Patrick Arlt
f3c802c97c
add test for new popup functionality
2015-03-28 19:20:56 -07:00
Patrick Arlt
52be81b18b
Merge branch 'master' of github.com:Leaflet/Leaflet into popup-debugging
2015-03-14 10:22:25 -07:00
Vladimir Agafonkin
aa1b3b4d4c
Merge pull request #3289 from Leaflet/phantomjs-travis
...
Attempt to fix random PhantomJS DISCONNECTED errors on Travis
2015-03-13 10:47:18 -07:00
Yohan Boniface
4e25056703
Typo in test description
2015-03-09 10:13:42 +01:00
Yohan Boniface
c10f81f95d
Remove flyTo callback (but keep test refactored)
2015-03-09 10:11:20 +01:00
Yohan Boniface
60df920452
Add optional callback to map.flyTo
2015-03-08 12:21:43 +01:00
Yohan Boniface
00b97f3b01
Remove browserNoActivityTimeout from karma config
2015-03-07 23:12:15 +01:00
Vladimir Agafonkin
8e78c429e0
Merge pull request #3291 from Leaflet/popupAnchor
...
Fix popupAnchor not taken into account when passing L.Popup to bindPopup
2015-03-07 23:57:10 +02:00
Yohan Boniface
250f03339b
Fix popupAnchor not taken into account when passing L.Popup to bindPopup
2015-03-07 19:00:27 +01:00
Yohan Boniface
d53a0a9779
Allow to use console in tests
...
This prevents us from adding /* eslint no-console: 0 */ each time
we need to use console.log/trace for debugging.
This also means that we will not be blocked if we forget a console
in the tests before commiting, but this should also happen while using
the inline "no-console" config, and given that this only affects tests
files, I think the confort of being able to use console easily worths
the risk of pushing a console in the tests files.
2015-03-07 12:48:46 +01:00
Yohan Boniface
196040b795
Attempt to fix random PhantomJS DISCONNECTED errors on Travis
2015-03-07 12:45:41 +01:00
Yohan Boniface
19033957d7
A few more tests on Polyline and Polygon (cf #3279 )
2015-03-06 09:14:00 +01:00
Yohan Boniface
0d0269ac15
Remove Polyline.addLatLng and Polyline.spliceLatLngs
...
Those method are not consistent (or too complexe) among
the supported Polygon/Polyline (cf #3279 )
2015-03-06 09:05:50 +01:00
Yohan Boniface
602cff077f
Ensure polygons latlngs are never flat (cf #2648 )
2015-03-04 18:14:51 +01:00
Vladimir Agafonkin
4e44e12ecf
add basic marker click test
2015-03-02 19:33:39 +02:00
Vladimir Agafonkin
d84c38a5a2
Merge pull request #3267 from akauppi/fix-jake-indents
...
fix 'jake'
2015-03-01 23:11:31 +02:00
Asko Kauppi
f61a681c56
fix 'jake'
2015-03-01 22:51:04 +02:00
Yohan Boniface
a9658d7178
Use standard .eslintrc naming
2015-02-26 11:29:42 +01:00
Yohan Boniface
5b3ba078bf
Do not try to remove drag class if marker as no icon
...
Since 4c46abe781
it's possible
to have a marker off the map with dragging still enabled.
We want to be able to disable it in this situation too.
2015-02-13 17:53:23 +01:00
John Firebaugh
21701a6fae
Remove test specific to old zoom code
2015-02-06 16:36:43 -08:00
John Firebaugh
e52c551652
Remove trailing whitespace
2015-02-06 16:36:27 -08:00
Vladimir Agafonkin
54c712cf2b
Merge pull request #2926 from aparshin/clip-round
...
Add optional parameter for result rounding in L.PolyUtil.clipPolygon and L.LineUtil.clipSegment
2015-02-06 17:42:53 +02:00
Vladimir Agafonkin
aeb5083170
complete the switch to ESLint
2015-01-28 19:33:45 +02:00
Vladimir Agafonkin
d145b1fdba
fix a bunch of eslint warnings in the spec suite
2015-01-28 19:32:27 +02:00
Stefan Sydow
4c46abe781
preserve dragable state on layer deactivation
2015-01-19 19:07:04 +01:00
John Firebaugh
2ee1aa2c23
jshint
2015-01-12 11:03:42 -08:00
Patrick Arlt
9186eade96
remove method checks from test
2015-01-11 08:31:41 -08:00
Patrick Arlt
ff8023a460
fix passing latlng to openPopup, fix build
2015-01-07 09:50:06 -08:00
Patrick Arlt
ef0ee1483d
consistant failing test
2015-01-02 07:39:00 -08:00
Patrick Arlt
2d709141a8
fix tests, misc cleanup
2014-12-29 13:50:23 -08:00
Sergey Kruk
c8e5d7c61b
L.latLng factory not to throw error on empty array parameter
2014-12-05 20:36:35 +03:00
Sergey Kruk
c5ebd534b2
Factory L.latLng to accept altitude as third parameter or an object's 'alt' property
2014-12-01 16:02:43 +03:00
John Firebaugh
87c7d1d563
No-op Control#remove if not on a map ( fixes #2877 )
2014-11-13 11:25:49 -08:00
John Firebaugh
0b86fa3266
Remove control from existing map in onAdd ( fixes #3020 )
2014-11-13 10:49:43 -08:00
John Firebaugh
ef96884021
Ensure parent init hooks are called ( fixes #2545 )
2014-11-12 14:49:46 -08:00
John Firebaugh
bad49e7612
Add autoClose option to Popup
...
Fixes #2716
Fixes #1853
2014-11-12 12:52:50 -08:00
John Firebaugh
d2871e68e5
Add test for #3008
2014-11-12 10:53:26 -08:00
John Firebaugh
68f86d85d3
Better fix for tile pruning
...
Need to always prune in _addTiles, otherwise tiles can
get stranded.
2014-11-07 16:27:42 -08:00
Jeff Smale
c6dea37d86
Preserve marker draggability on setIcon ( fixes #2578 )
2014-11-05 18:12:21 -08:00
John Firebaugh
4825fc05b3
Add test for #1871
2014-11-05 15:44:23 -08:00
John Firebaugh
e6d857eb70
jshint
2014-11-05 15:22:49 -08:00
John Firebaugh
ea2c397523
No-op bringToFront/Back when Path is not on a map ( fixes #2439 )
2014-11-05 15:13:28 -08:00