From 9f4eedc4192a247411ed2216a50cfd0d0bdba4f2 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 30 May 2018 08:48:56 +0800 Subject: [PATCH] - Fix (regression): Star tool (radialshift) --- dist/extensions/ext-star.js | 4 ++-- editor/extensions/ext-star.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/extensions/ext-star.js b/dist/extensions/ext-star.js index 8cb70354..ab62f514 100644 --- a/dist/extensions/ext-star.js +++ b/dist/extensions/ext-star.js @@ -157,7 +157,7 @@ fill = c.fill, strokecolor = c.strokecolor, strokeWidth = c.strokeWidth, - radialShift = c.radialShift, + radialshift = c.radialshift, point = c.point, orient = c.orient, circumradius = Math.sqrt((x - cx) * (x - cx) + (y - cy) * (y - cy)) / 1.5, @@ -187,7 +187,7 @@ } else if (orient === 'edge') { angle = angle + Math.PI / point - Math.PI / 2; } - angle += radialShift; + angle += radialshift; x = inradius * Math.cos(angle) + cx; y = inradius * Math.sin(angle) + cy; diff --git a/editor/extensions/ext-star.js b/editor/extensions/ext-star.js index 96c76a1b..a9e6629d 100644 --- a/editor/extensions/ext-star.js +++ b/editor/extensions/ext-star.js @@ -149,7 +149,7 @@ svgEditor.addExtension('star', function (S) { let x = opts.mouse_x; let y = opts.mouse_y; - const {cx, cy, fill, strokecolor, strokeWidth, radialShift, point, orient} = c, + const {cx, cy, fill, strokecolor, strokeWidth, radialshift, point, orient} = c, circumradius = (Math.sqrt((x - cx) * (x - cx) + (y - cy) * (y - cy))) / 1.5, inradius = circumradius / document.getElementById('starRadiusMulitplier').value; newFO.setAttributeNS(null, 'r', circumradius); @@ -176,7 +176,7 @@ svgEditor.addExtension('star', function (S) { } else if (orient === 'edge') { angle = (angle + (Math.PI / point)) - (Math.PI / 2); } - angle += radialShift; + angle += radialshift; x = (inradius * Math.cos(angle)) + cx; y = (inradius * Math.sin(angle)) + cy;