Vladimir Agafonkin
54c712cf2b
Merge pull request #2926 from aparshin/clip-round
...
Add optional parameter for result rounding in L.PolyUtil.clipPolygon and L.LineUtil.clipSegment
2015-02-06 17:42:53 +02:00
Jared
ff679aa7dc
Do not render the stroke if the weight is explicitly set to 0
...
When rendering to SVG, if the weight is 0 the outline is not displayed.
However, when rendering to canvas it will still display the outline.
This change makes the behaviour consistent when rendering to either.
2015-02-06 11:41:40 +13:00
Vladimir Agafonkin
e749d1915b
add ESLint rules; various code style fixes
2015-01-28 17:27:31 +02:00
kerryarts
0daf28fb4f
Fix _bringToFront/Back implementation for VML renderer
2014-11-21 09:41:02 +13:00
Fabian Zeindl
4f06ac30b0
Don't append/remove the SVG container
...
Tested this on IOS7, which has 85% adoption and I see no flicker.
Reduces layout and paint-times.
2014-11-05 18:19:35 -08:00
John Firebaugh
ea2c397523
No-op bringToFront/Back when Path is not on a map ( fixes #2439 )
2014-11-05 15:13:28 -08:00
Vladimir Agafonkin
de4910f407
use offset when animating transform to avoid dividing by zero
2014-10-21 12:21:28 +03:00
Vladimir Agafonkin
fc05abd336
Merge pull request #2834 from bullgare/path_svg_fill_rule
...
svg's attribute 'fill-rule' now can be set via options into either 'evenodd' or 'nonzero'
2014-10-20 13:18:30 +03:00
bullgare
809844b539
svg's attribute fill-rule supports two values: 'evenodd' and 'nonzero'. now for canvas, too.
2014-10-20 10:24:11 +04:00
Alexander Parshin
3a5d45d62e
Add optional parameter for result rounding in L.PolyUtil.clipPolygon and L.LineUtil.clipSegment
2014-09-30 09:57:53 +04:00
AndreyGeonya
9445c2f9f2
this commit fixes #2499
2014-08-05 18:14:02 +03:00
bullgare
38476615e6
svg's attribute fill-rule supports two values: 'evenodd' and 'nonzero'. now we can set it via options and it's not hardcoded. https://developer.mozilla.org/ru/docs/Web/SVG/Attribute/fill-rule
2014-08-05 17:37:20 +04:00
Vladimir Agafonkin
93cf8d7e95
Merge pull request #2605 from danzel/vmlfix
...
Round point so that circles work again :)
2014-07-30 13:58:39 +03:00
Fabian Zeindl
132e5b6f7c
Performance: don’t set width/height on SVG if unchanged. Saves a costly layout/repaint in some situations.
2014-06-17 15:39:58 +02:00
Vladimir Agafonkin
b16daa39b9
fix rare error when dragging vectors, close #2706
2014-05-26 18:52:24 +03:00
danzel
1f08c65794
Round point so that circles work again :)
2014-04-02 10:40:42 +13:00
Dmitry Lutsik
67100000fa
proper svg pointer-events value
2014-03-28 15:23:11 +02:00
AndreyGeonya
52fff05eb8
circle marker radius redrawing fixed
2014-03-24 19:20:34 +02:00
Vladimir Agafonkin
b626553bc2
Merge pull request #2524 from jeffsmale90/dasharray-offset
...
Added Dasharray offset
2014-03-19 11:56:15 -07:00
Jeff Smale
17434c5b0c
Renamed dashArrayOffset to dashOffset for consistency
2014-03-17 12:54:22 +13:00
Vladimir Agafonkin
b8897f26fb
instantiate default renderers in map, fix #2523
2014-03-07 14:52:11 +02:00
Jeff Smale
d05a049dde
Fixed indentation of dasharrayoffset code
2014-03-07 12:35:49 +13:00
Jeff Smale
b1e08ab8c2
Added stroke-dashArray to path options
2014-03-07 11:50:44 +13:00
Vladimir Agafonkin
f8ee421ca4
Merge pull request #2419 from danzel/vector-during-zoom
...
Fix adding Vector layers during a zoom animation
2014-02-27 17:28:09 +02:00
Vladimir Agafonkin
860fb92461
Merge pull request #2418 from danzel/ie8-fixes
...
IE8 fixes.
2014-02-27 17:27:44 +02:00
Vladimir Agafonkin
f574bf5114
Merge pull request #2482 from perliedman/canvas-update-2476
...
Call layer's _update like SVG renderer does, fixes #2476
2014-02-22 16:49:49 +02:00
Per Liedman
501d61ce98
Call layer's _update like SVG renderer does, fixes #2476
2014-02-22 13:31:13 +01:00
Alexander Dimitrov
687c0b75a4
Move _containsPoint method to CircleMarker for canvas renderer
...
CircleMarker is the parent of Circle as of 508a75f7a8
and should have _containsPoint instead.
Fixes no method '_containsPoint' error when hovering on a map with a CircleMarker.
2014-02-22 00:24:15 +02:00
danzel
4a556886fb
Fix adding Vector layers during a zoom animation. Fixes #2416
2014-01-30 11:14:57 +13:00
danzel
4e84f9ec1f
IE8 fixes.
...
Events on VML elements actually work :)
2014-01-30 11:12:07 +13:00
Vladimir Agafonkin
9020f4d41e
greatly simplify zoom animation calculations - finally!!!
2014-01-15 17:15:52 +02:00
Vladimir Agafonkin
f32173573a
do not stack transforms for real now, close #1705
2014-01-13 17:10:58 +02:00
Vladimir Agafonkin
6f5c17fae0
more consistent renderer anim calculations
2014-01-10 21:59:25 +02:00
Vladimir Agafonkin
d22f75cc36
simpler renderer zoom anim
2014-01-10 20:19:01 +02:00
Vladimir Agafonkin
758679ab69
add DomUtil.setTransform for translate+scale ops
2014-01-10 16:05:58 +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
192973093f
fix ellipse disappearing with big radiusY
2014-01-03 15:27:18 +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
6940b5bac9
use projected coordinates in Circle, close #1465
2014-01-02 15:23:28 +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
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
93214d7e3c
clean up mouse events handling code
2013-12-27 18:36:24 +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
5d9cc6bf47
optimize canvas implementation further
2013-12-23 16:55:12 +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
1dfec0a021
shortcut hasEventListeners as listens
2013-12-19 17:09:32 -05:00
Vladimir Agafonkin
6d81f5e51c
fix edge case with SVG event delegation
2013-12-19 16:13:34 -05:00
Vladimir Agafonkin
df4570a9f0
delegate SVG event handling to root, close #2315
2013-12-19 00:58:13 -05:00
Vladimir Agafonkin
6d1142a978
only propagate events if given true to fire, #2311
2013-12-18 23:23:22 -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
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
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
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
6f9d05fc40
implement Canvas events and SVG click-through
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
d55ffb07ec
cleaner and more consistent zoom animation options
2013-12-06 15:10:29 +02:00
Vladimir Agafonkin
6e0e006209
add Layer getEvents and manage listeners on map automatically
2013-12-06 15:10:29 +02:00
Vladimir Agafonkin
789c356017
fire add/remove events and manage _map in Layer
2013-12-06 15:10:28 +02:00
Vladimir Agafonkin
a30a872a78
initial Layer commit (base class for all layers)
2013-12-06 15:10:28 +02:00
Vladimir Agafonkin
a0ad7b6c0e
clean up Poly code
2013-12-05 16:44:50 +02:00
Vladimir Agafonkin
674b7cbc3f
clean up Path classes
2013-12-05 16:01:25 +02:00
Vladimir Agafonkin
6b9731283d
add and use DomUtil.remove
2013-12-05 14:35:39 +02:00
Vladimir Agafonkin
5bc104237e
clean up Popup, add popup fade out animation
2013-12-04 16:43:24 +02:00
Vladimir Agafonkin
b151ceb63f
remove LatLng constants, add move maxMargin to equals arguments
2013-12-03 19:09:36 +02:00
Bradley Gentry
9d2f90b508
Gave L.CircleMarker.setLatLng a return statement.
2013-11-20 13:37:30 -05:00
Vladimir Agafonkin
c96384ef82
add Path className option
2013-11-12 22:57:21 +02:00
Vladimir Agafonkin
c500d5ac1f
make className utils work for SVG elements in IE9, ref #2164
2013-11-12 18:52:13 +02:00
Vladimir Agafonkin
6c85f43fb2
fix CircleMarker getRadius, close #2016 , close #2017
2013-11-04 18:56:49 +02:00
Alexander Parshin
f5de36e229
Add holes support to L.Polygon.setLatLngs(). Fixes #1518
2013-10-13 20:17:12 +04:00
Vladimir Agafonkin
40ef71dc4c
minor cleanup
2013-08-27 22:06:13 +03:00
Steve Kashishian
e5bf57c4f7
move a circlemarker's popup with each new position.
2013-07-31 14:40:13 -04:00
palewire
ede3aebf6a
Corrected camelcasing of lineCap and lineJoin.
2013-07-18 06:56:42 -07:00
Vladimir Agafonkin
e7ebb60133
rename to lineCap and lineJoin, #1863 , close #1843
2013-07-18 14:54:43 +03:00
Vladimir Agafonkin
101d0df5f7
Merge pull request #1863 from datadesk/linecap
...
New stroke-linecap and stroke-linejoin style options with VML alternatives. For #1843 .
2013-07-18 04:51:18 -07:00
Vladimir Agafonkin
756e9b854c
avoid vector flickering on Mac Safari more often, #902
2013-07-17 19:28:24 +03:00
palewire
a2c987febc
New stroke-linejoin style option with a VML alternative. For #1843 .
2013-07-12 22:52:32 -07:00
palewire
665a956bc2
New stroke-linecap style option with a VML alternative. For #1643 .
2013-07-12 22:37:30 -07:00
Vladimir Agafonkin
a24a772694
add multipoly getLatLngs, close #1839 , update changelog
2013-07-11 15:11:28 +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
Steve Kashishian
4c5b700e60
Prevent memory leak in removal of canvas layers
2013-05-30 14:39:03 -04:00
Steve Kashishian
c684fb4652
Prevent infinite loop in adding of canvas CircleMarkers
2013-05-28 19:39:14 -04:00
John Firebaugh
c9e2453eed
Bounds-check array access in Polygon#initialize
2013-05-02 16:17:04 -07:00
Vladimir Agafonkin
f139eea41a
fix path canvas race condition, close #1615
2013-04-24 22:29:25 +03:00
Vladimir Agafonkin
557ebaad3c
cleanup, utilize factories more
2013-04-22 17:49:03 +03:00
Krister Kari
dc07a68ed0
Modify or replace regexes that break javascript lazy evaluation with multi line comments
2013-04-20 02:01:56 +03:00
Vladimir Agafonkin
c4dc595490
more strict jshinting, enforce single quotes and camelCase for consistency
2013-04-11 12:45:52 +03:00
Vladimir Agafonkin
81221ae4cd
fix jshint 1.1.0 errors, update deps and build
2013-03-07 17:39:55 +02:00
John Firebaugh
5e7857cdff
Normalize polygon holes ( fixes #1459 )
2013-02-27 08:12:18 -08:00
Vladimir Agafonkin
f4e8735547
clean up the canvas hovering code
2013-02-27 17:17:37 +02:00
Vladimir Agafonkin
6fff98435c
Merge branch 'canvas_path_cursor' of github.com:snkashis/Leaflet into canvas-hover
...
* 'canvas_path_cursor' of github.com:snkashis/Leaflet:
mouseout firing
mistaken, unneeded test file.
don't perform if animatingZoom
dupe of 50K vector test, for canvas.
Hand cursor for canvas paths
2013-02-27 16:13:50 +02:00
danzel
3afee7eb49
Allow overwriting the given array, for usage by spliceLatLngs.
2013-02-20 11:03:13 +13:00
snkashis
0fb7a13277
force new array
2013-02-20 10:38:44 +13:00
snkashis
57d42d1636
allow for no overwrite option in covertLatLngs
2013-02-20 10:38:43 +13:00
snkashis
382a9965ef
mouseout firing
2013-02-17 21:25:11 -05:00
snkashis
d010d586d0
don't perform if animatingZoom
2013-02-17 14:57:32 -05:00
snkashis
baeeddb078
Hand cursor for canvas paths
2013-02-17 14:21:27 -05:00
snkashis
11195f4849
allow Path.bindPopup to take existing popups as well.
2013-02-17 13:31:27 -05:00
snkashis
7472550087
Allow clicks to pass thru non clickable paths
2013-02-14 22:17:34 -05:00
jacobtoye
e13d5faa80
Remove Polyline.Edit file.
2013-02-11 13:17:11 +13:00
danzel
6b51780e79
Make setRadius and updateStyle({radius: 123 }) work.
2013-02-04 09:51:27 +13:00
danzel
ded525fb06
Fix #1297 CircleMarker setRadius not working if called before adding to map.
2013-02-03 15:35:12 +13:00
Vladimir Agafonkin
08f770fcc2
Merge pull request #1053 from inpursuit/enhancement/3
...
Allow pointer-events to be set via options passed to shape
2013-01-31 08:37:43 -08:00
Vladimir Agafonkin
292d2b3633
merge snkashis polygon fix
2013-01-18 17:43:31 +02:00
Yohan Boniface
44a7c6e0d8
Typo in Polyline docstring
2013-01-18 12:48:43 +01:00
oslek
7dd7e4f699
Robust array type check for cross-frame support
...
In a multi-frame DOM environment, if setView is called with an array for
the first parameter, a subsequent call to getBounds raises "Invalid
LatLng object" exception. This is the case if the array passed to
setView was created outside the iFrame that contains the map. It causes
the array test using "instanceof" in L.latLng to fail, and
_initialTopLeftPoint to not being properly initialized.
Thank you to Juriy Zaytsev for the full explaination:
http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
John Resig and Dean Edwards post comments and concur.
2013-01-14 14:04:50 -08:00
snkashis
b3a7f2ffb7
Remove click handler with onRemove
2013-01-12 16:55:13 -05:00
Vladimir Agafonkin
116671fa55
Merge pull request #1013 from fdlk/set-radius-in-style
...
radius is part of CircleMarker style so should be changeable in using setStyle();
2013-01-11 08:43:18 -08:00
Vladimir Agafonkin
80d0da1bdf
fix iOS vectir zoom anim regression, close #1259
2013-01-08 12:18:10 +02:00
snkashis
b2e3f16b54
pass the clicked obj, not the map.
2012-12-27 15:37:57 -05:00
Mehmet Alkanlar
f2b9a3a32e
Fixed issue with Polyline.Edit remove hook.
2012-12-24 17:35:33 -08:00
Yohan Boniface
952f9289c3
Eventlistener is Path._openPopup not Path.openPopup
2012-12-21 18:13:45 +01:00
Vladimir Agafonkin
b9727d9190
made up my mind about comment format, add some more comments
2012-12-20 12:37:40 +02:00
Vladimir Agafonkin
6134a41554
jshint fixes and cleanup for uglifyjs2
2012-12-12 19:09:47 +02:00
Vladimir Agafonkin
5f467337f6
move editing stuff out of Polyline.js into Polyline.Edit.js
2012-12-12 18:24:44 +02:00