Per Liedman
c5cbbf8174
Clean up and document event propagation properties ( #5880 )
...
* Add sourceTarget and propagatedFrom to events
Also documents events' target, sourceTarget, propagatedFrom
and layer properties.
Fixes #4510 .
* Use propagatedFrom, which is equivalent of the original code
* propagetedFrom -> propagatedFrom
2017-10-27 16:18:12 +02:00
Fabrizio
d9655a1e9a
Change Util.formatNum default to 6 decimals ( #5492 )
...
* Util.formatNum default to 6
Changed Util.formaNum default to 6 decimails.
Solved 0 decimals bug.
Added tests.
Can be useful for PR #5444
* Changed documentation
Changed documentation to 6 instead of 5
2017-10-02 18:36:59 +02:00
Per Liedman
0a6c500e58
Add test for extending L namespace
2017-07-27 11:03:52 +03:00
Vladimir Agafonkin
957f05da23
fix non-extendable objects regression of 1.1.0
...
Closes #5650 until we figure out a less hacky solution.
2017-07-27 11:03:51 +03:00
Per Liedman
b23d83f464
Don't turn enter keypress into clicks on map ( #5507 )
...
* Don't turn enter keypress into clicks on map
But still preserve functionality to open marker's popup through
enter keypress when focused.
Fixes #5499 .
* Clean code
Thanks @egoroof
* Change name of keypress handler to _onKeyPress
* Add unit test
2017-06-02 11:18:46 +02:00
Per Liedman
c18ac11efb
Include L.Mixin.Events again; add deprecation notice ( #5365 )
...
Close #5358
2017-03-07 09:53:24 +01: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
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
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
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
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
fbc6265fb7
Fix when all listeners are removed during dispatch ( #4555 )
...
Close #4478 .
2016-05-12 10:22:36 +02:00
Jan Pieter Waagmeester
37254587be
Allow dashes in template placeholders + tests
2016-03-21 14:36:21 +01:00
Iván Sánchez Ortega
ccd95e38e6
L.Class.include & mergeOptions now return 'this'
2016-02-15 16:38:35 +01: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
Asko Kauppi
f61a681c56
fix 'jake'
2015-03-01 22:51:04 +02:00
Vladimir Agafonkin
d145b1fdba
fix a bunch of eslint warnings in the spec suite
2015-01-28 19:32:27 +02:00
John Firebaugh
ef96884021
Ensure parent init hooks are called ( fixes #2545 )
2014-11-12 14:49:46 -08:00
Vladimir Agafonkin
47783821f7
rename limitExecByInterval to throttle, better implementation
2013-12-21 01:49:25 -05:00
Vladimir Agafonkin
1dfec0a021
shortcut hasEventListeners as listens
2013-12-19 17:09:32 -05:00
Vladimir Agafonkin
6d1142a978
only propagate events if given true to fire, #2311
2013-12-18 23:23:22 -05:00
Vladimir Agafonkin
ce4a031d40
faster on/off, add private non-sugary versions
2013-12-18 23:07:39 -05:00
Vladimir Agafonkin
9f09f50812
remove Util invokeEach since on/off are hot functions
2013-12-18 22:05:47 -05:00
Vladimir Agafonkin
21cfd7f3d9
replace Events mixin with Evented inheritance
2013-12-17 14:07:21 -05:00
John Firebaugh
ad9d0f8c7f
Make options object prototype-inherited
...
Fixes #2294
2013-12-15 13:30:30 -08:00
Vladimir Agafonkin
88f21d01af
better bind, use native fn.bind if available
2013-12-02 19:16:00 +02:00
Calvin Metcalf
4a0beebde3
Revert "' #1968 compiled interpolation'"
2013-11-20 15:42:06 -05:00
Vladimir Agafonkin
91c039b7aa
jshinting and major clean up of specs code, ref #2151
2013-11-07 23:54:33 +02:00
Vladimir Agafonkin
77bd10c69d
Merge pull request #2149 from danzel/ios7-2122
...
Work around iOS7 memory trouble
2013-11-04 13:33:54 -08:00
danzel
fa35aba1e9
Improve this test and fix removeEventListener.
2013-11-05 10:29:52 +13:00
danzel
579c044c00
Fix a potential event bug due to bad cleanup.
2013-11-05 10:21:32 +13:00
Vladimir Agafonkin
ec7baabccf
merge runner cleanup #2134
2013-11-04 13:18:24 +02:00
danzel
9fce697982
Work around iOS7 memory trouble by not applying the contextId performance optimization when context==this. The optimization does nothing in this case anyway. Fixes #2122
2013-11-04 09:47:55 +13:00
Jan Pieter Waagmeester
99bd248566
Whitespace OCD
2013-10-29 11:49:09 +01:00
Jan Pieter Waagmeester
a7f2d1975f
Allow double quotes in template strings fixes #2120
2013-10-23 15:14:59 +02:00
Vladimir Agafonkin
361c9cab6d
fix isArray not working IE9 in rare cases, close #2077
2013-10-08 16:59:42 +03:00
Vladimir Agafonkin
21d8bde0b7
fix tempate interpolation test and build
2013-08-27 22:06:01 +03:00
Calvin Metcalf
b2b25c8941
' #1968 compiled interpolation'
2013-08-27 13:03:07 -04:00
Vladimir Agafonkin
0849d06c1b
fix whitespace in event spec, #1661
2013-05-08 12:58:50 +03:00
R. Merkert
bbb7acb3f4
Make sure events don't fire after listener is removed.
...
This patch fixes a problem with a dangling event listener, which is
called even after it has been removed. This situation can occur when a
listener is removed during an even dispatch.
To fix this problem, the old action is replaced with a NOOP, so that
when the listener is being fired, it is not the old listener but the
NOOP.
2013-05-07 20:16:25 -04:00
Daan Mortier
c6620859e4
Updated patch for issue #1631 based on feedback
2013-04-29 13:03:05 +02:00
Daan Mortier
52498f1ef9
Issue #1631 : Fixed a bug on removeEventListener
...
Bugfix for issue #1631 where removeEventListener would throw when no event listeners are registered on the object.
2013-04-29 11:53:16 +02:00
Vladimir Agafonkin
5647f37ae6
cleanup and merge #1596 , adds Events#once
2013-04-19 17:23:45 +03:00
Vladimir Agafonkin
a5e8bc0f49
add Util.invokeEach for hash arguments in event methods
2013-04-19 17:23:14 +03:00
iirvine
84ad7db070
clearEventListeners -> clearAllListeners
2013-04-15 14:09:32 -07:00
iirvine
2d5bf783fe
initial commit of #clearEventListeners
2013-04-15 14:09:32 -07:00