diff options
author | vkalev <vjk1883@gmail.com> | 2021-09-28 15:26:38 -0400 |
---|---|---|
committer | vkalev <vjk1883@gmail.com> | 2021-09-28 15:26:38 -0400 |
commit | fd64e2e902fa28f31f81661c863d9f4e574d5d6b (patch) | |
tree | cd45397b8b6c797ac12fdaf719c5cdd2ea41adb3 | |
parent | 2de1f44d00bcaa5e95045d8b6b7a2c713a72e7b3 (diff) |
removing previous addpoint code
-rw-r--r-- | src/client/views/InkStrokeProperties.ts | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/client/views/InkStrokeProperties.ts b/src/client/views/InkStrokeProperties.ts index adb9a7aa1..8821ef5e4 100644 --- a/src/client/views/InkStrokeProperties.ts +++ b/src/client/views/InkStrokeProperties.ts @@ -99,49 +99,6 @@ export class InkStrokeProperties { return controls; }); - // this.applyFunction((doc: Doc, ink: InkData) => { - // const newControl = { X: x, Y: y }; - // const newPoints: InkData = []; - // let [counter, start, end] = [0, 0, 0]; - // for (let k = 0; k < points.length; k++) { - // if (end === 0) { - // controls.forEach((control) => { - // if (control.X === points[k].X && control.Y === points[k].Y) { - // if (k < index) { - // counter++; - // start = k; - // } else if (k > index) { - // end = k; - // } - // } - // }); - // } - // } - // if (end === 0) end = points.length - 1; - // // Index of new control point with regards to the ink data. - // const newIndex = Math.floor(counter / 2) * 4 + 2; - // // Creating new ink data with the new control point and handle points inputted. - // for (let i = 0; i < ink.length; i++) { - // if (i === newIndex) { - // const [handleA, handleB] = this.getNewHandlePoints(points.slice(start, index + 1), points.slice(index, end), newControl); - // newPoints.push(handleA, newControl, newControl, handleB); - // // Adjusting the magnitude of the left handle line of the right neighboring control point. - // const [rightControl, rightHandle] = [points[end], ink[i]]; - // const scaledVector = this.getScaledHandlePoint(false, start, end, index, rightControl, rightHandle); - // rightHandle && newPoints.push({ X: rightControl.X - scaledVector.X, Y: rightControl.Y - scaledVector.Y }); - // } else if (i === newIndex - 1) { - // // Adjusting the magnitude of the right handle line of the left neighboring control point. - // const [leftControl, leftHandle] = [points[start], ink[i]]; - // const scaledVector = this.getScaledHandlePoint(true, start, end, index, leftControl, leftHandle); - // leftHandle && newPoints.push({ X: leftControl.X - scaledVector.X, Y: leftControl.Y - scaledVector.Y }); - // } else { - // ink[i] && newPoints.push({ X: ink[i].X, Y: ink[i].Y }); - // } - - // } - - // return newPoints; - // }); } /** |