@@ -75,7 +75,7 @@ return /******/ (function(modules) { // webpackBootstrap
75
75
/******/ }
76
76
/******/
77
77
/******/ var hotApplyOnUpdate = true ;
78
- /******/ var hotCurrentHash = "0c12eca309296d90b0aa " ; // eslint-disable-line no-unused-vars
78
+ /******/ var hotCurrentHash = "3082a6b3aa4ce9ad3025 " ; // eslint-disable-line no-unused-vars
79
79
/******/ var hotCurrentModuleData = { } ;
80
80
/******/ var hotCurrentParents = [ ] ; // eslint-disable-line no-unused-vars
81
81
/******/
@@ -3828,17 +3828,43 @@ return /******/ (function(modules) { // webpackBootstrap
3828
3828
this . CLASSES = __webpack_require__ ( 111 ) ;
3829
3829
__webpack_require__ ( 112 ) ;
3830
3830
3831
+ var angleToPoint = function angleToPoint ( angle , radius ) {
3832
+ return mojs . h . getRadialPoint ( { angle : angle , radius : radius , center : { x : 0 , y : 0 } } ) ;
3833
+ } ;
3834
+
3831
3835
var getPath = function getPath ( ) {
3832
3836
var str = '' ;
3833
3837
for ( var i = 0 ; i < _this . points . length ; i ++ ) {
3834
3838
var point = _this . points [ i ] ,
3835
3839
x = point . x + point . tempX ,
3836
3840
y = point . y + point . tempY ;
3841
+
3837
3842
if ( i === 0 ) {
3843
+ var nextPoint = _this . points [ i + 1 ] ;
3844
+ var xNext = nextPoint . x + nextPoint . tempX ,
3845
+ yNext = nextPoint . y + nextPoint . tempY ;
3846
+
3838
3847
str += 'M' + x + ', ' + y / _constants2 . default . CURVE_PERCENT + ' ' ;
3839
- } else {
3840
- str += 'L' + x + ', ' + y / _constants2 . default . CURVE_PERCENT + ' ' ;
3841
- }
3848
+ if ( point . type !== 'straight' ) {
3849
+ var handle2 = angleToPoint ( point . handle2 . angle , point . handle2 . radius ) ;
3850
+ str += 'C' + ( point . x + handle2 . x ) + ', ' + ( point . y / 3.58 + handle2 . y / 3.58 ) + ' ' ;
3851
+ } else {
3852
+ str += 'C' + point . x + ', ' + point . y / 3.58 + ' ' ;
3853
+ }
3854
+
3855
+ if ( nextPoint . type !== 'straight' ) {
3856
+ var handle1 = angleToPoint ( nextPoint . handle1 . angle , nextPoint . handle1 . radius ) ;
3857
+ str += nextPoint . x + handle1 . x + ', ' + ( nextPoint . y / 3.58 + handle1 . y / 3.58 ) + ' ' ;
3858
+ } else {
3859
+ str += nextPoint . x + ', ' + nextPoint . y / 3.58 + ' ' ;
3860
+ }
3861
+
3862
+ str += nextPoint . x + ', ' + nextPoint . y / 3.58 + ' ' ;
3863
+ } else { }
3864
+ // str += `L${x}, ${y/C.CURVE_PERCENT} ` ;
3865
+
3866
+ // if ( i === 0) { str += `M${x}, ${y/C.CURVE_PERCENT} `; }
3867
+ // else { str += `L${x}, ${y/C.CURVE_PERCENT} ` ; }
3842
3868
}
3843
3869
_this . path = str ;
3844
3870
} ;
0 commit comments