@@ -66,7 +66,7 @@ export const EllipseMarker = Path.extend( /** @lends EllipseMarker */ {
6666 Util . setOptions ( this , options ) ;
6767
6868 this . _majAxis = this . options . majAxis ;
69- this . _minAxis = this . options . majAxis ;
69+ this . _minAxis = this . options . minAxis ;
7070 this . _posAngle = this . options . posAngle ;
7171 this . _latlng = latLng ( latlng ) ;
7272
@@ -247,8 +247,8 @@ Canvas.include({
247247
248248 ctx . save ( ) ;
249249 ctx . translate ( p . x , p . y ) ;
250- ctx . rotate ( layer . _posAngle * Math . PI / 180.0 ) ;
251- ctx . scale ( 1 , s ) ;
250+ ctx . rotate ( - layer . _posAngle * Math . PI / 180.0 ) ;
251+ ctx . scale ( s , 1 ) ;
252252
253253 ctx . beginPath ( ) ;
254254 ctx . arc ( 0 , 0 , r , 0 , Math . PI * 2 , false ) ;
@@ -268,11 +268,12 @@ SVG.include({
268268 _updateEllipse : function ( layer ) {
269269 const deg = Math . PI / 180.0 ,
270270 p = layer . _point ,
271- r = layer . _minAxis ,
272- r2 = layer . _majAxis ,
273- dx = r * Math . cos ( layer . _posAngle * deg ) ,
274- dy = r * Math . sin ( layer . _posAngle * deg ) ,
275- arc = 'a' + r + ',' + r2 + ' ' + layer . _posAngle + ' 1,0 ' ;
271+ r = layer . _majAxis ,
272+ r2 = layer . _minAxis ,
273+ angle = - layer . _posAngle
274+ dx = r * Math . cos ( angle * deg ) ,
275+ dy = r * Math . sin ( angle * deg ) ,
276+ arc = 'a' + r + ',' + r2 + ' ' + angle + ' 1,0 ' ;
276277
277278 // drawing a circle with two half-arcs
278279 const d = layer . _empty ( ) ? 'M0 0' :
0 commit comments