Commit Graph

69 Commits

Author SHA1 Message Date
Dian Jin
a6888ab13f getBoundsZoom fix for small size and padding and tests (#4532) 2016-05-09 10:39:14 +02:00
Iván Sánchez Ortega
23890c5fa4 Skip a touch unit test on non-touch browsers 2016-04-19 12:21:01 +02:00
Iván Sánchez Ortega
5389d23e79 Add unit test for drag handler enable/disable bug (#4387) 2016-04-15 15:30:39 +02:00
David Uvenman
864326610a Added click tolerance also for non-touch devices (#4396)
* Added option for click tolerance. This option is used as a threshold to determine if the user event should be considered a click or a drag.

* Updated docs for clickTolerance to state the correct default value.

* Added tests for click threshold
2016-04-15 10:18:50 +02:00
Per Liedman
36b60b7c88 Round scale to avoid float rounding issues in fitBounds
Reverts _round() fix from b511c7bcc8.

Close #4395.
2016-04-06 22:58:00 +02:00
Zsolt Ero
928100f961 Workaround for flyTo bug
* test for flyTo start latlng == end latlng condition
* workaround for flyTo infinite loop
* expect for zoomend values

Close #4226
2016-04-02 21:12:40 +02:00
Per Liedman
b511c7bcc8 Round bounds size.
Bounds size should be in pixels, so round it to avoid
any floating point inaccuracies from projection.

Closes #4255.
2016-04-02 19:55:02 +02:00
Yohan Boniface
4bcc89bc54 Make sure bounds are bounds before testing its validity in fitBounds
Fix #4374
2016-04-02 19:23:58 +02:00
Iván Sánchez Ortega
c6c0e4f484 Switch prosthetic-hand to 1.3.0 and use onStop callback 2016-04-02 17:55:22 +02:00
Iván Sánchez Ortega
8da61993d2 Added four prosthetic-hand tests, checking mouse&touch drag events and touch-zoom 2016-03-18 15:24:42 +01:00
Iván Sánchez Ortega
8dee2d3591 Fix for #4208 with extra unit tests 2016-02-09 10:07:36 +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
d3198d8d39 Fix duration not passed through from setView to panBy (fix #3300) 2015-10-12 14:02:30 +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
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
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
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
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
Nathan Cahill
794e64df41 add map.setMinZoom() and map.setMaxZoom() closes #3380 2015-04-16 18:39:40 -05: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
John Firebaugh
4825fc05b3 Add test for #1871 2014-11-05 15:44:23 -08:00
Vladimir Agafonkin
e2e1ccb2f0 fix 404 warnings in tests 2014-10-23 13:52:19 +03:00
danzel
d5a3112852 Another break with adding and removing tile layers. 2014-01-30 16:35:08 +13:00
danzel
2396a10282 Fix adding and immediately removing a Layer from the map when the map is never initialized 2014-01-30 16:15:03 +13:00
John Firebaugh
c1654c4626 Add hasLayer tests 2013-12-13 17:51:37 -05:00
Vladimir Agafonkin
4011a6199f move add/removeLayer logic to Layer; ditch tilelayersload event 2013-12-06 15:10:28 +02:00
Vladimir Agafonkin
80607c6044 reimplement max bounds with proper zooming 2013-11-14 17:45:47 +02:00
Vladimir Agafonkin
be42f7a3b6 Merge branch 'patch-1' of https://github.com/kapouer/Leaflet into maxbounds
* 'patch-1' of https://github.com/kapouer/Leaflet:
  test Map#setMaxBounds and Map#panInsideBounds
  panInsideBounds: fit or center, pass options, remove boundsMinZoom
2013-11-14 14:13:45 +02:00
Vladimir Agafonkin
977fb99b6a fix specs after messy merge 2013-11-13 21:56:48 +02:00
Vladimir Agafonkin
3618f404f5 Merge branch 'invalidateSize' 2013-11-13 21:50:02 +02:00
John Firebaugh
33263e537d Add debounceMoveend option to invalidateSize 2013-11-13 10:53:34 -08:00
Vladimir Agafonkin
91c039b7aa jshinting and major clean up of specs code, ref #2151 2013-11-07 23:54:33 +02:00
Jérémy Lal
d7bf010f0b test Map#setMaxBounds and Map#panInsideBounds 2013-10-14 15:27:11 +02:00
Vladimir Agafonkin
2250cee6ec allow setZoom before setView, make setView zoom optional, close #2056, close #1449 2013-09-30 15:00:46 +03:00
fastrde
a8a8ebe309 added a spec test for worldCopyJump set Center and Zoom fix #1982 2013-08-18 03:18:21 +02:00
Vladimir Agafonkin
e18b7eded6 Merge pull request #1931 from russelldavis/fix-invalidate-size
Fix rounding issues in Map::invalidateSize
2013-08-06 02:43:40 -07:00
John Firebaugh
a0c6363bb6 Invalidate _initialCenter along with size (fixes #1919) 2013-08-05 14:09:09 -07:00
Russell Davis
f568768142 Fix rounding issues in Map::invalidateSize 2013-08-01 23:14:11 -07:00
Vladimir Agafonkin
7c744d06e6 add getMinZoom test for #1866
[skip ci]
2013-07-25 12:44:55 +03:00
Vladimir Agafonkin
75c133082c fix Map min/maxZoom not overriding TileLayer-derived min/max, close #1848 2013-07-12 15:05:59 +03:00
John Firebaugh
4839c44509 Fire layerremove after removing the layer
This is consistent with 0.5.x and seems more useful. Updating
the state of a layer switcher using map.hasLayer in response
to layeradd and layerremove events is my use case.
2013-07-08 16:53:04 -07:00
John Firebaugh
4802561e0e Don't fire layerremove if layeradd was never fired 2013-06-01 22:16:53 -07:00
John Firebaugh
51fccc80fe Don't call Layer#onAdd on a layer that has been removed 2013-06-01 22:11:42 -07:00