Browse Source

typo

pull/6/head
Casper Lamboo 1 year ago
parent
commit
87b6e9851b
  1. 2
      src/d2/tools/BaseTool.js
  2. 2
      src/reducer/selectionOperationReducer.js
  3. 4
      src/shape/shapeToPoints.js
  4. 2
      src/utils/subtractShapeFromState.js
  5. 2
      src/utils/textUtils.js

2
src/d2/tools/BaseTool.js

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

2
src/reducer/selectionOperationReducer.js

@ -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()

4
src/shape/shapeToPoints.js

@ -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()

2
src/utils/subtractShapeFromState.js

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

2
src/utils/textUtils.js

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

Loading…
Cancel
Save