Commit Graph

2090 Commits

Author SHA1 Message Date
Vladimir Agafonkin
064902665e Merge pull request #2413 from danzel/propagation-fixes
Propagation fixes
2014-01-29 02:34:03 -08: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
5916db8678 Don't crash if a marker is removed from the map before it fires a mouseout event. 2014-01-29 14:45:27 +13:00
danzel
595e8d2537 Allow stacking propagations. L.MarkerCluster uses this as follows:
Marker propagates to FeatureGroup.
That FeatureGroup propagates to MarkerClusterGroup.
Then users add listeners on the MarkerClusterGroup
2014-01-29 14:43:52 +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
Adam J. Gamble
579a429c3b change unload order 2014-01-28 17:20:08 +00:00
Vladimir Agafonkin
47166b62e5 fix GeoJSON coordsToLatLng 2014-01-28 13:26:58 +02:00
Vladimir Agafonkin
bce7c49c17 Merge pull request #2377 from Leaflet/accel
Smarter hardware acceleration
2014-01-28 03:22:31 -08:00
Vladimir Agafonkin
02d5896740 remove leftover code 2014-01-27 18:21:06 +02:00
Vladimir Agafonkin
187d9c2368 move Safari hacks to CSS, do not optimize contrast in Chrome 2014-01-27 18:18:04 +02:00
Vladimir Agafonkin
cf35d69655 size-based tile layer HW hack; use top/left for tiles everywhere 2014-01-27 17:54:12 +02:00
Vladimir Agafonkin
9020f4d41e greatly simplify zoom animation calculations - finally!!! 2014-01-15 17:15:52 +02:00
Vladimir Agafonkin
f081ff2908 fix build 2014-01-14 17:20:58 +02:00
Vladimir Agafonkin
cd0c9ff8a5 position the hack absolutely 2014-01-14 17:18:51 +02:00
Vladimir Agafonkin
322039ea85 move the hack to tile container reset 2014-01-14 17:15:58 +02:00
Vladimir Agafonkin
592d2ce8f4 horrible hacks to fix iOS Safari bugging out hw-acceleration 2014-01-14 16:29:39 +02:00
Vladimir Agafonkin
cfde916edf make sure tiles in iOS Safari are not hw-accelerated layers 2014-01-14 16:28:40 +02:00
Vladimir Agafonkin
6e5d3e26e6 use translate2d instead of top/left for tiles when hw-accelerated
this fixes gaps between tiles in Safari and makes iOS Safari butter
smooth when zooming
2014-01-14 16:26:58 +02:00
Vladimir Agafonkin
22226c20c2 simpler tile bg buffer loading logic 2014-01-13 21:52:49 +02:00
Vladimir Agafonkin
6d5fe1f724 a bit cleaner zoom anim logic 2014-01-13 20:54:13 +02:00
Vladimir Agafonkin
f32173573a do not stack transforms for real now, close #1705 2014-01-13 17:10:58 +02:00
José Moreira
92890bed12 Events.js: Check if array exists before loop 2014-01-13 12:31:42 +00:00
Vladimir Agafonkin
1acffc5a3d don't disable propagation on closeButton, close #2351 2014-01-11 15:00:28 +02:00
Vladimir Agafonkin
1ed9924288 fix ImageOverlay on low zooms with Mercator distortion 2014-01-11 14:59:56 +02:00
Vladimir Agafonkin
48d5bac476 clean up image overlay, fix setting opacity/url when not added 2014-01-11 02:51:55 +02:00
Vladimir Agafonkin
2c90de5076 cleaner ImageOverlay animation 2014-01-10 23:25:31 +02:00
Vladimir Agafonkin
6f5c17fae0 more consistent renderer anim calculations 2014-01-10 21:59:25 +02:00
Vladimir Agafonkin
cc34737a93 remove DomUtil getTranslateString/getScaleString 2014-01-10 20:26:20 +02:00
Vladimir Agafonkin
d22f75cc36 simpler renderer zoom anim 2014-01-10 20:19:01 +02:00
Vladimir Agafonkin
cd746192b5 stack transforms properly for tile layer anim, ref #1705 2014-01-10 19:24:39 +02:00
Vladimir Agafonkin
b5569dd0c3 never stack transforms, simpler grid layer anim, ref #1705 2014-01-10 19:11:59 +02:00
Vladimir Agafonkin
758679ab69 add DomUtil.setTransform for translate+scale ops 2014-01-10 16:05:58 +02:00
Vladimir Agafonkin
30f86b11e3 improve zoom perf by avoiding recompositing in grid layers 2014-01-10 14:34:44 +02:00
Vladimir Agafonkin
3b57b9a040 set the source in bindPopup(popup), close #2354 2014-01-10 14:05:21 +02:00
Vladimir Agafonkin
646850f5f2 stop panning animation correctly, better inertia, close #2360 2014-01-10 13:29:37 +02:00
Vladimir Agafonkin
7e98b33db3 update year to 2014 2014-01-08 20:40:04 +02:00
Vladimir Agafonkin
be85ff304c fix Canvas layer redawing 2014-01-03 20:14:24 +02:00
Vladimir Agafonkin
ae8bc579a4 fix Circle in flat projections 2014-01-03 18:08:19 +02:00
Vladimir Agafonkin
8f4baaed14 don't render circles near poles or with 0 radius 2014-01-03 17:37:51 +02:00
Vladimir Agafonkin
5e441018f8 fix true mercator regression 2014-01-03 17:37:16 +02:00
Vladimir Agafonkin
192973093f fix ellipse disappearing with big radiusY 2014-01-03 15:27:18 +02:00
Vladimir Agafonkin
264eca8ee6 don't clamp mercator after 85, simplify projection code 2014-01-03 15:26:40 +02:00
Vladimir Agafonkin
06fb3ce6e4 much better circle approximation near poles 2014-01-03 03:50:22 +02:00
Vladimir Agafonkin
7ff0fa9c72 approximate Circle with ellipse 2014-01-03 00:37:34 +02:00
Vladimir Agafonkin
c4a9418d3b add low level ellipse rendering support 2014-01-02 20:36:47 +02:00
Vladimir Agafonkin
9ce2cc5cbd use simpler distance formula (precision is good enough) 2014-01-02 16:32:57 +02:00
Vladimir Agafonkin
3d34f27df8 normalize latlng argument in Map wrapLatLng 2014-01-02 16:15:00 +02:00
Vladimir Agafonkin
ea1402ec4f simplify calculations in scale control 2014-01-02 16:13:08 +02:00
Vladimir Agafonkin
5923a64ec4 add Map distance method, close #1442 2014-01-02 16:13:03 +02:00
Vladimir Agafonkin
2ee5c90f02 add CRS.Earth, move Harvesine distance there 2014-01-02 15:42:14 +02:00
Vladimir Agafonkin
6940b5bac9 use projected coordinates in Circle, close #1465 2014-01-02 15:23:28 +02:00
Vladimir Agafonkin
b2965351e0 ignore openPopup if map not initialized, close #2343 2013-12-31 02:43:56 +02:00
Vladimir Agafonkin
7d18adbe73 don't postfix createPane name, #1742 2013-12-30 23:39:30 +02:00
Vladimir Agafonkin
2000734658 do not fail on unnamed createPane, #1742 2013-12-30 20:16:21 +02:00
Vladimir Agafonkin
76f9c7ae7f add Map createPane/getPane methods, close #1742 2013-12-30 19:17:52 +02:00
Vladimir Agafonkin
dd1b9617dd add syntactic sugar to DomEvent.on/off 2013-12-30 17:40:23 +02:00
Vladimir Agafonkin
6cea376807 add missing Canvas events, fix mouseover spam 2013-12-30 13:22:14 +02:00
Vladimir Agafonkin
bc9721b3be simplify pane structure (remove objectsPane, not necessary) 2013-12-28 03:38:59 +02:00
Vladimir Agafonkin
ee3f2f8b1e stop propagation explicitly; marker and vector mouseup
this way we know what events won’t propagate to Map and this behavior
is consistent across layers
2013-12-28 03:12:18 +02:00
Vladimir Agafonkin
7ca19b59ea clean up Marker mouse events code 2013-12-27 19:27:46 +02:00
Vladimir Agafonkin
8bf7f963e2 fix marker drag regression 2013-12-27 19:27:11 +02:00
Vladimir Agafonkin
c354113293 fix build (fire preclick even with no click listeners) 2013-12-27 18:46:10 +02:00
Vladimir Agafonkin
93214d7e3c clean up mouse events handling code 2013-12-27 18:36:24 +02:00
Vladimir Agafonkin
e7898584c3 more BoxZoom cleanup 2013-12-27 18:17:51 +02:00
Vladimir Agafonkin
e27b295261 clean up BoxZoom, fix cursors #1813 2013-12-27 17:22:16 +02:00
Vladimir Agafonkin
9ae1623910 include version info in top comment, close #2276 2013-12-26 18:46:00 +02:00
Vladimir Agafonkin
abdf0c2afa better compression for Leaflet.js 2013-12-26 18:45:29 +02:00
Vladimir Agafonkin
2b96ea5aba make Leaflet.js requirable for version, remove noConflict test
Currently tests don’t account for wrapper function around Leaflet
source, so the noConflict one failed — removing for now.
2013-12-26 18:29:46 +02:00
Vladimir Agafonkin
9a6288ef37 make Android double-click issue threshold smaller, close #2303 2013-12-25 20:37:25 +02:00
Vladimir Agafonkin
8764063c46 simpler and faster mouse pos; remove DomUtil.documentIsLtr 2013-12-24 18:46:05 +02:00
Vladimir Agafonkin
9eaaf096c1 use getTileSize when determining tile bounds 2013-12-24 00:47:11 +02:00
Vladimir Agafonkin
3ae769a4e7 pass options in canvas/svg factories 2013-12-23 22:39:42 +02:00
Vladimir Agafonkin
bc405b5911 make propagation work correctly for vector layers 2013-12-23 21:33:25 +02:00
Vladimir Agafonkin
6edc39e19a revert ce29ac59 2013-12-23 17:21:12 +02:00
Vladimir Agafonkin
5d9cc6bf47 optimize canvas implementation further 2013-12-23 16:55:12 +02:00
Vladimir Agafonkin
6b43bc6566 fix Popup remove/add sequence 2013-12-23 12:47:02 +02:00
Vladimir Agafonkin
37485fd334 fix layers control not firing overlayadd, close #2330 2013-12-23 12:41:50 +02:00
Vladimir Agafonkin
dd72a6545a simplify bringToFront/Back, add DomUtil toFront/Back 2013-12-23 12:31:51 +02:00
Vladimir Agafonkin
a97c599201 Layer popup methods and cleanup, fix #2279, fix #2292 2013-12-21 12:46:38 +01:00
Vladimir Agafonkin
9e6a747f6f minor events-related cleanup 2013-12-21 09:53:26 +01:00
Vladimir Agafonkin
deec9d54be don't bind on each move in IE7-8 2013-12-21 09:36:53 +01:00
Vladimir Agafonkin
47783821f7 rename limitExecByInterval to throttle, better implementation 2013-12-21 01:49:25 -05:00
Vladimir Agafonkin
b7c03c8a99 add more comments to Util, clean up 2013-12-20 22:47:09 -05:00
Vladimir Agafonkin
d0051500c3 comment the Events code better 2013-12-20 17:26:27 -05:00
Vladimir Agafonkin
dcb6f74ef5 ensure execution order in events, slightly bulkier structure 2013-12-19 18:35:05 -05:00
Vladimir Agafonkin
ce29ac59a9 fire load after viewreset/moveend to fix Canvas rendering 2013-12-19 18:04:55 -05:00
Vladimir Agafonkin
70e3500716 rename _leaflet_events to _events 2013-12-19 17:20:04 -05:00
Vladimir Agafonkin
88b27fe832 clean up events code a bit 2013-12-19 17:14:53 -05:00
Vladimir Agafonkin
1dfec0a021 shortcut hasEventListeners as listens 2013-12-19 17:09:32 -05:00
Vladimir Agafonkin
d4fe4cb804 simplify events code, better footprint, speedup removal 2x 2013-12-19 17:05:36 -05:00
Vladimir Agafonkin
6d81f5e51c fix edge case with SVG event delegation 2013-12-19 16:13:34 -05:00
Vladimir Agafonkin
247c13fbdd optimize perf-sensitive LayerGroup methods 2013-12-19 02:23:17 -05:00
Vladimir Agafonkin
df4570a9f0 delegate SVG event handling to root, close #2315 2013-12-19 00:58:13 -05:00
Vladimir Agafonkin
be67170869 simpler stamp without closure 2013-12-19 00:20:43 -05:00
Vladimir Agafonkin
824d168375 optimize DomEvent addListener 2013-12-19 00:20:23 -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
6b132009af handle attrib in Layer, don't use map layeradd/remove (perf)
otherwise thousands of markers/vectors will trigger layeradd and check
for attributions, this is waste of resources
2013-12-18 23:04:08 -05:00
Vladimir Agafonkin
f7198e71dc fix build 2013-12-18 22:22:40 -05:00
Vladimir Agafonkin
1c925fa698 don't copy over layer options on GeoJSON setStyle (perf) 2013-12-18 22:21:17 -05:00
Vladimir Agafonkin
9f09f50812 remove Util invokeEach since on/off are hot functions 2013-12-18 22:05:47 -05:00
Vladimir Agafonkin
a628e724a1 minor poly performance tweaks 2013-12-18 21:55:04 -05:00
Vladimir Agafonkin
9cc1b3608d more comments in new vector code 2013-12-18 15:19:53 -05:00
Vladimir Agafonkin
511cbd5465 add more comments to Canvas, fix dragging cursors 2013-12-18 14:57:06 -05:00
Vladimir Agafonkin
cf55d0edb9 clean up Renderer/SVG code and add comments 2013-12-18 14:36:58 -05:00
Vladimir Agafonkin
b329c4a9fd only round clip edges, other path points already rounded 2013-12-18 14:35:51 -05:00
Vladimir Agafonkin
4d8990f7a8 dry up the renderer code a bit 2013-12-18 13:45:05 -05:00
Vladimir Agafonkin
95e394f0d8 fix mouse handling regression in Path 2013-12-18 13:20:01 -05:00
Vladimir Agafonkin
f2af995a10 tweak default vectors color 2013-12-18 12:03:24 -05:00
Vladimir Agafonkin
988dc3a27a redraw partially when updating canvas layers (massive speedup) 2013-12-18 12:03:24 -05:00
Vladimir Agafonkin
e5d1ff6db2 fix dragging on canvas layer 2013-12-18 12:03:24 -05:00
Vladimir Agafonkin
811006adc5 cache circle bounds 2013-12-18 12:03:24 -05:00
Vladimir Agafonkin
eca9fe966e fix retina canvas redraw bug 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
7bffd4924b do stroke hit detection after polygon 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
f930588bca simpler Circle._containsPoint, remove accidental debug 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
f4f8c06c75 fix adding/removal of vectors and renderers 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
f750b76e04 fix addLatLng not affecting bounds 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
2e9141fa98 better style defaults for vector features 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
518b82b755 fix GeoJSON resetStyle in case no style was specified 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
508a75f7a8 make Circle inherit from CircleMarker and not the other way 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
fe5cd4b127 tweaks to renderer instancing 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
fdae94ce34 fix test with empty polyline 2013-12-18 12:03:23 -05:00
Vladimir Agafonkin
46c279c88f various IE vectors fixes 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
4e33ce3e0a cache getBounds and optimize Canvas events 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
f045742a28 add Polyline and Polygon getCenter, openPopup in centroid 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
674d9ae4d3 Retina support and better default renderer handling 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
e35095fcf9 fix CircleMarker setStyle 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
05054a1088 fix Popup regression 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
dc5151b81a fix GeoJSON roundtripping 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
04addb791e fix choosing default renderer 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
d0eedd3f52 rename vectors2 folder into vectors, update deps 2013-12-18 12:03:22 -05:00
Vladimir Agafonkin
2ac898654a minor clean up 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
21510e6100 add CircleMarker 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
1e04f5feba add Circle implementation 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
fd98197556 require ctx in DomEvent off if on had it (breaking!!!) 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
6f9d05fc40 implement Canvas events and SVG click-through 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
41a576b930 minor clean up 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
ddb9a376be flatten poly latlngs into rings, proper clipping 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
6543fe50bc fix jshint errors 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
6aa605f606 clean up lineJoin/lineCap 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
08028b7a7a add VML implementation (not tested yet) 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
5d8e7279b2 remove vector stuff that's already ported 2013-12-18 12:03:21 -05:00
Vladimir Agafonkin
b2eee96d5c remove MultiPoly classes (unnecessary) 2013-12-18 12:03:20 -05:00
Vladimir Agafonkin
48a3c34702 add Path Popup implementation 2013-12-18 12:03:20 -05:00
Vladimir Agafonkin
919b862c15 add MultiPolyline and MultiPolygon implementations 2013-12-18 12:03:20 -05:00
Vladimir Agafonkin
b19fd8d1cd proper Canvas redraw & setStyle 2013-12-18 12:03:20 -05:00
Vladimir Agafonkin
7976b1f284 add basic Canvas implementation 2013-12-18 12:03:20 -05:00
Vladimir Agafonkin
3c5cf0fd2b fix stroke appearing on polygon clip edges 2013-12-18 12:03:20 -05:00
Vladimir Agafonkin
1bd0ee2dd5 SVG.js minor cleanup 2013-12-18 12:03:20 -05:00
Vladimir Agafonkin
274e1559b7 fix "error parsing z" error in SVG 2013-12-18 12:03:20 -05:00