copy ZM values to polygon in makeRegular

This commit is contained in:
Ben Kuster
2018-07-12 12:52:05 +02:00
parent ed7788ca37
commit 33ef64c912
2 changed files with 11 additions and 0 deletions

View File

@@ -434,6 +434,9 @@ export function makeRegular(polygon, center, radius, opt_angle) {
const angle = startAngle + (modulo(i, sides) * 2 * Math.PI / sides);
flatCoordinates[offset] = center[0] + (radius * Math.cos(angle));
flatCoordinates[offset + 1] = center[1] + (radius * Math.sin(angle));
for (let j = 2; j < stride; j++) {
flatCoordinates[offset + j] = center[j];
}
}
polygon.changed();
}