aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authoreleanor-park <eleanor_park@brown.edu>2024-06-20 16:42:44 -0400
committereleanor-park <eleanor_park@brown.edu>2024-06-20 16:42:44 -0400
commit3d14f06ad1297a6adc851945804211efb9dff7ff (patch)
treee48202e43999230b5e202af53d31df9aaf1901c7 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
parentbd64bbd29a38ae4979b2165d1fa9b9c76c2600d5 (diff)
user customization added
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 93b63ac4c..b8257ff31 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1268,23 +1268,25 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
};
@undoBatch
- createInkStrokes = (strokeList: InkData[], alpha?: number) => {
- console.log(strokeList.length);
- strokeList.forEach(inkData => {
+ createInkStrokes = (strokeData: [InkData, string, string][]) => {
+ strokeData.forEach((stroke: [InkData, string, string]) => {
// const points: InkData = FitCurve(inkData, 20) as InkData;
// const allPts = GenerateControlPoints(inkData, alpha);
- const bounds = InkField.getBounds(inkData);
+ const bounds = InkField.getBounds(stroke[0]);
const B = this.screenToFreeformContentsXf.transformBounds(bounds.left, bounds.top, bounds.width, bounds.height);
const inkWidth = ActiveInkWidth() * this.ScreenToLocalBoxXf().Scale;
const inkDoc = Docs.Create.InkDocument(
- inkData,
+ stroke[0],
{ title: 'stroke',
x: B.x - inkWidth / 2,
y: B.y - inkWidth / 2,
_width: B.width + inkWidth,
_height: B.height + inkWidth,
stroke_showLabel: BoolCast(Doc.UserDoc().activeInkHideTextLabels)}, // prettier-ignore
- inkWidth
+ inkWidth,
+ stroke[1],
+ undefined,
+ stroke[2] === 'none' ? undefined : stroke[2]
);
this.addDocument(inkDoc);
});