Yohan Boniface
e28f7ae984
Do not fail when closing an interactive tooltip not yet added to the map ( #4937 )
2016-09-26 16:40:51 +03:00
Andris Nolendorfs
62fdf6f642
Fix handling of NaN in getScaleZoom ( #4914 )
...
* Fixed an issue when crs.zoom returns NaN in getScaleZoom
* Small documentation fixes
2016-09-15 09:46:53 +02:00
Iván Sánchez Ortega
63fd4edc76
wrap tileBounds if noWrap is false by @fyeah ( #4908 )
2016-09-12 16:59:21 +02:00
Per Liedman
ed1a612e6f
Make paths insensitive to the order of its map's moveend handlers ( #4855 )
...
* Make Paths always update after renderer updates
Close #4851
* Add test
* Add docs for update event
* Remove listener when layer is removed
2016-08-31 17:58:46 +03:00
Per Liedman
017d29c4eb
Just store array of listeners, count is no longer needed. ( #4842 )
...
* Just store array of listeners, count is no longer needed.
* Remove unused code
2016-08-25 17:23:58 +02:00
Yohan Boniface
7927708b40
Allow to create and open a tooltip without source ( fix #4827 ) ( #4836 )
2016-08-25 15:29:20 +02:00
Per Liedman
cee8edeaf2
Fix listener removal even if an event is firing
...
Close #4840 .
2016-08-25 15:20:51 +02:00
Per Liedman
59c6bb201c
Use spies as listeners
2016-08-24 09:52:29 +02:00
Per Liedman
0c6dc2ce1e
Make event firing reentrant
...
Close #4833
2016-08-24 09:26:53 +02:00
Iván Sánchez Ortega
e9957cfa02
Detect L.Icon.Default.imagePath using CSS. #4604 , #3696 , #4579 ( #4605 )
...
* CSS-based paths for L.Icon.Default. #4604 , #3696 , #4579
* Unit tests for default icons
* Make CSS icon path detection IE8-friendly
* Backwards compatibility for L.Icon.Default.imagePath override.
* Don't overwrite options
2016-08-22 16:40:03 +02:00
Steve
92baa9c73f
Throw error on call to L.Polygon getCenter before map add ( #4820 )
...
* Throw error on call to L.Polygon getCenter before map add
References #4740
* add polyline handling, tests, and docstring
2016-08-15 17:01:41 +02:00
Iván Sánchez Ortega
09937e39b0
Add a _leaflet_id to the map container to fix #4806 ( #4810 )
2016-08-11 09:10:46 +02:00
Yohan Boniface
a0ee68558f
Close non permanent tooltip on map click on touch ( fix #4741 )
2016-08-02 16:55:17 +02:00
Yohan Boniface
8047b0b7a9
Make sure we call event listeners in the order they are registered ( fix #4743 ) ( #4769 )
2016-08-02 17:53:06 +03:00
Yohan Boniface
e746211be7
Better tooltip offset handling ( fix #4772 ) ( #4773 )
...
- default offset is now [0, 0]
- both offset.x and offset.y are always honoured
- positive x always move the tooltip on the right
- positive y always move the tooltip on the bottom
2016-08-02 17:51:22 +03:00
Yohan Boniface
fc1dc96638
Allow to call bindTooltip on a layer not yet added to a map ( fix #4778 ) ( #4779 )
2016-08-02 17:50:53 +03:00
Vladimir Agafonkin
94303a681b
Merge pull request #3952 from Leaflet/label
...
Implement L.Label
2016-07-15 13:06:36 +03:00
Per Liedman
0bcfbdb537
Cleanup, tests and minor bug fixes for event system
2016-07-08 15:01:38 +02:00
Fabian Zeindl
0210071dad
refactoring of events, it should be about 4 times faster now
2016-07-08 14:47:02 +02:00
Yohan Boniface
64ba1f7f95
Rename Label in Tooltip, PopupBase in DivOverlay
2016-07-08 13:51:18 +02:00
Yohan Boniface
fe3649f032
Default L.Label border and tip to white
2016-07-08 11:33:53 +02:00
Yohan Boniface
bd2616f901
Do not rely on options.draggable to compute draggableMoved ( #4638 )
...
One can enable dragging of a marker after it has been initialized
with draggable=false.
2016-07-08 11:22:54 +02:00
Yohan Boniface
f8221e09f7
We now load CSS in Phantom, so no need to skip those tests
2016-07-08 11:08:25 +02:00
Yohan Boniface
0dd58bd01f
Merge branch 'master' into label
2016-07-08 11:07:22 +02:00
Yohan Boniface
5dfc3364d1
Allow to make screenshots in Phantomjs ( #4705 )
...
* Load CSS in PhantomJS
* Allow to take screenshot in PhantomJS while running tests
For that, one need to run this call:
window.top.callPhantom({'render': 'screenshot.png'});
* Make PhantomJS serve images
* Bonus: those tests now passe in Phantom too
* Add helper to make screenshot in tests
takeScreenshot();
or
takeScreenshot('path/to/screenshot.png');
2016-07-08 11:05:12 +02:00
Yohan Boniface
d18d661837
More label tests
...
431579ce4a
needed to make them pass on Phantom
2016-07-02 23:02:48 +02:00
Yohan Boniface
2f4b97de19
Add support for "center" Label position
2016-07-02 10:52:04 +02:00
Yohan Boniface
14bfedf7ff
Merge branch 'master' into label
2016-07-02 10:36:42 +02:00
Iván Sánchez Ortega
8cb745ce0a
L.Evented.listens() returns false on removed event handlers, #4474 ( #4476 )
...
* Fix L.Evented.listens() on removed event handlers, #4474
* Fix bad unit tests for marker events
* Only check for listerners.length if listerners is actually defined
2016-07-01 11:14:22 +02:00
Per Liedman
01790eacda
Ignore events if Draggable is disabled, fixing disabling drag on click in IE11 ( #4479 )
...
* Ingore events if Draggable is disabled
Close #3666 .
* Add test for verifying fix to #3666
2016-06-27 16:16:03 -07:00
Iván Sánchez Ortega
b2d7cf110b
Fix #4039 : Use different L.Bounds for "marking as prunable" and loading tiles ( #4650 )
...
* Fix #4039 : Use different L.Bounds for "marking as prunable" and loading tiles.
* configurable tile pruning tests
* using spy for testing load did not happen
2016-06-21 15:27:44 +02:00
Yohan Boniface
d8a6ad4010
Use proper Hand onStop callback instead of setTimeout in popup spec
2016-06-16 15:34:16 +02:00
Yohan Boniface
d1de37aa88
Fix broken sizeOption when L.point instance ( #4636 )
2016-06-10 15:36:07 +02:00
Yohan Boniface
95d5b59c5f
Fix canvas not filtering click event after drag ( #4493 )
...
* Fix preclick not fired in canvas
* Do not add canvas layers to click event targets if just dragged (fix #4458 )
2016-06-01 17:43:32 +03:00
Ray Hammond
72c4f986b1
Icon size x can now be initialised with a number ( #4608 )
...
Icon size x can now be initialised with a number. Fixes #3185
2016-06-01 17:24:24 +03:00
Jon Woyame
878a022897
Prevent map click when layer has popup ( #4603 )
...
* prevent map click when layer has popup
* add test cases for click events on Paths
* update test for Path popups to check popup is open
2016-05-29 22:01:16 +02:00
Per Liedman
fbc6265fb7
Fix when all listeners are removed during dispatch ( #4555 )
...
Close #4478 .
2016-05-12 10:22:36 +02:00
Yohan Boniface
6e8ac31993
Fix setMaxBounds not resetting when passing null argument ( #4494 )
2016-05-09 15:12:51 +02:00
Iván Sánchez Ortega
cc3380f98e
Tweaked values of getBoundsZoom unit tests ( #4528 )
2016-05-09 10:42:19 +02:00
Dian Jin
a6888ab13f
getBoundsZoom fix for small size and padding and tests ( #4532 )
2016-05-09 10:39:14 +02:00
Yohan Boniface
4a9140e6b1
Add L.Label related documentation
2016-05-06 15:00:01 +02:00
Yohan Boniface
737137634e
Rename Label clickable option to interactive
2016-05-06 13:39:09 +02:00
Yohan Boniface
8a2255afc3
Merge branch 'master' into label
2016-04-30 14:36:48 +02:00
Jan Pieter Waagmeester
02078c2b39
Make sure L.Control.removeLayer() doesn't raise an error if a layer not in the control is removed from it ( #4487 )
2016-04-22 16:11:22 +02:00
Nathan Cahill
1eafc015c1
create points from objects with x and y properties ( #4465 )
2016-04-20 17:05:31 +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
Iván Sánchez Ortega
b74cf171f8
Merge pull request #4404 from Leaflet/fix-4401
...
Fix regression when setting style of Path with canvas renderer
2016-04-08 17:50:13 +02:00
Per Liedman
593a553e64
Pass layer on when calling _updateDashArray
...
Add specs to verify intialization and setStyle with dashArray.
Close #4401 .
2016-04-08 16:43:21 +02:00