This commit is contained in:
Casper Lamboo 2021-05-19 19:59:54 +02:00
parent 31e9ec735f
commit 87b6e9851b
5 changed files with 6 additions and 6 deletions

View File

@ -159,7 +159,7 @@ export default class BaseTool extends EventGroup {
} else {
return clipperShape
.offset(margin, { joinType: 'jtSquare', endType: 'etOpenButt' })
.seperateShapes()
.separateShapes()
.some(_clipperShape => _clipperShape.pointInShape(position, true, true));
}
});

View File

@ -65,7 +65,7 @@ export default function (state, action) {
unionShape = unionShape.union(shape);
}
const unionShapes = unionShape.scaleDown(CLIPPER_PRECISION).seperateShapes().map(shape => {
const unionShapes = unionShape.scaleDown(CLIPPER_PRECISION).separateShapes().map(shape => {
shape = shape
.removeDuplicates()
.mapToLower()

View File

@ -185,7 +185,7 @@ function shapeToPointsRaw(shapeData) {
if (shapeData.fill) {
new ClipperShape([points, ...holes], true, true, false, false)
.simplify('pftEvenOdd')
.seperateShapes()
.separateShapes()
.forEach(shape => {
const [points, ...holes] = shape
.mapToLower()
@ -236,7 +236,7 @@ function shapeToPointsCorneredRaw(shapeData) {
roundPrecision: 0.25
})
.scaleDown(CLIPPER_PRECISION)
.seperateShapes()
.separateShapes()
.forEach(shape => {
let [points, ...holes] = shape
.mapToLower()

View File

@ -67,7 +67,7 @@ export default function subtractShapeFromState(state, differenceShape, tool, opt
// Returns two dimentional array, with per shape an array of paths.
// The first item of each path is the outline, the others are holes, if there are any.
let resultShapes = resultShape
.seperateShapes()
.separateShapes()
.map(resultPaths => { // go through all created shapes (1 shape can be a combination of outline+holes)
if (scale !== undefined) resultPaths.scaleDown(scale);
resultPaths = resultPaths

View File

@ -24,7 +24,7 @@ export function createTextRaw(text, size, precision, family, style, weight) {
const shapes = new ClipperShape(pathsOffset, true, true, false)
.fixOrientation()
.seperateShapes()
.separateShapes()
.map(shape => shape.mapToLower())
.map(shapeToVectorShape);