Commit Graph

27 Commits

Author SHA1 Message Date
ghybs
d6fc47d70e Fix(DivIcon): revert #5517 to avoid appending a single node instead of generating content (#5574)
* Docs(Marker): explain checks for re-using icon element

when the marker is modified with an icon of the same type (i.e. an image icon with an image icon, or a DivIcon with a DivIcon), or checks for NOT re-using the icon element when modifying with an icon of a different type (i.e. an image icon with a DivIcon, or the reverse).

* Revert "Div icon accept node element as option (#5517)"

This reverts commit ba7bfb5011.

Conflicts:
	spec/suites/layer/marker/MarkerSpec.js
2017-06-25 14:11:57 +02:00
MGMsystems
ba7bfb5011 Div icon accept node element as option (#5517)
* Added option to allow DOM elements inside a DIV icon

* Removed white line

* Adapted so that the dom element can be passed with the html option

* Update DivIcon.js

Changed documentation to state HTMLElement
2017-05-22 09:57:21 +02: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
Vladimir Agafonkin
fd8c2599ef fix icon url warnings in tests 2016-09-27 17:58:08 +03: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
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
Yohan Boniface
d1de37aa88 Fix broken sizeOption when L.point instance (#4636) 2016-06-10 15:36:07 +02: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
Vladimir Agafonkin
cfdbd10431 enforce indentation in specs 2015-09-25 13:55:37 +03: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
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
Vladimir Agafonkin
4e44e12ecf add basic marker click test 2015-03-02 19:33:39 +02: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
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
Jeff Smale
c6dea37d86 Preserve marker draggability on setIcon (fixes #2578) 2014-11-05 18:12:21 -08:00
Tom MacWright
74133f49f0 Fix MarkerSpec in retina browsers. 2014-10-21 12:21:29 +03:00
danzel
8cc7404f53 This should be oldLatLng, even if latlng is wrong, let's have this be right. refs #2412 #1423 2014-01-29 14:51:55 +13:00
danzel
e2d9a97836 Add oldLatlng parameter to Marker move event, will allow MarkerCluster to support moving markers. 2014-01-29 11:33:08 +13:00
Vladimir Agafonkin
a086b336b2 fix images 404 warnings in specs 2013-09-12 13:14:00 +03:00
John Firebaugh
475e736346 Revert "Consistent mouse event propagation in Marker and Path"
This reverts commit 4015f49615.
2013-06-28 16:22:20 -04:00
John Firebaugh
4015f49615 Consistent mouse event propagation in Marker and Path
Marker was missing mouseup and mousemove.
Path was missing mouseup.
2013-06-28 14:44:10 -04:00
danzel
19d49e027f Add another test for marker/shadow reuse 2013-06-24 08:54:40 +12:00
danzel
1a1cfb2e60 Make Marker setIcon unit tests better. 2013-06-12 16:18:20 +12:00
danzel
fa45913505 Make Icon/DivIcon reuse not try reuse the wrong dom element type. 2013-06-12 16:05:42 +12:00
danzel
7f2eff363b Add support to DivIcon for reusing a div. Fixes #1753. Still issues remain (Can't change a marker with a DivIcon to have an image Icon or vice versa) 2013-06-12 15:55:03 +12:00