解决贴地svg编辑时拖动出现负数的问题
This commit is contained in:
@ -1335,8 +1335,8 @@ class GroundSvg extends Base {
|
|||||||
w = (Math.cos(radiansW) * distance) * 2
|
w = (Math.cos(radiansW) * distance) * 2
|
||||||
h = (Math.cos(radiansH) * distance) * 2
|
h = (Math.cos(radiansH) * distance) * 2
|
||||||
// scaleY值
|
// scaleY值
|
||||||
this.scale.x = w / 3.5
|
this.scale.x = Math.abs(w) / 3.5
|
||||||
this.scale.y = h / 3.5
|
this.scale.y = Math.abs(h) / 3.5
|
||||||
break
|
break
|
||||||
case 'svg-control-points_2':
|
case 'svg-control-points_2':
|
||||||
case 'svg-control-points_8':
|
case 'svg-control-points_8':
|
||||||
@ -1407,8 +1407,8 @@ class GroundSvg extends Base {
|
|||||||
w = (Math.cos(radiansW) * distance) * 2
|
w = (Math.cos(radiansW) * distance) * 2
|
||||||
h = (Math.cos(radiansH) * distance) * 2
|
h = (Math.cos(radiansH) * distance) * 2
|
||||||
// scaleY值
|
// scaleY值
|
||||||
this.scale.x = w / 3.5
|
this.scale.x = Math.abs(w) / 3.5
|
||||||
this.scale.y = h / 3.5
|
this.scale.y = Math.abs(h) / 3.5
|
||||||
break
|
break
|
||||||
case 'svg-control-points_4':
|
case 'svg-control-points_4':
|
||||||
bearingW = (((turf.rhumbBearing(pointC, turf.point(controlPoints[4])) + 360) - this.angle) % 360)
|
bearingW = (((turf.rhumbBearing(pointC, turf.point(controlPoints[4])) + 360) - this.angle) % 360)
|
||||||
|
Reference in New Issue
Block a user