- Fix (regression): Star tool (radialshift)

This commit is contained in:
Brett Zamir
2018-05-30 08:48:56 +08:00
parent 81dc19cc17
commit 9f4eedc419
2 changed files with 4 additions and 4 deletions

View File

@@ -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;