aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/util/CurrentUserUtils.ts2
-rw-r--r--src/client/views/LightboxView.tsx3
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx2
-rw-r--r--src/client/views/nodes/imageEditor/ImageEditor.tsx2
-rw-r--r--src/client/views/smartdraw/SmartDrawHandler.tsx2
-rw-r--r--src/fields/InkField.ts2
6 files changed, 6 insertions, 7 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 009cd7de7..99faafe38 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -779,7 +779,7 @@ pie title Minerals in my tap water
{ title: " Size", toolTip: "Size of area pencil eraser", btnType: ButtonType.NumberSliderButton, toolType: "eraserWidth", ignoreClick: true, scripts: {script: '{ return setInkProperty(this.toolType, value, _readOnly_);}'}, funcs: {hidden:"NotRadiusEraser()"}, numBtnMin: 1, linearBtnWidth:40},
{ title: "Mask", toolTip: "Make Stroke a Stencil Mask", btnType: ButtonType.ToggleButton, icon: "user-circle",toolType: "inkMask", scripts: {onClick:'{ return setInkProperty(this.toolType, value, _readOnly_);}'}, funcs: {hidden:"IsNoviceMode()" } },
{ title: "Labels", toolTip: "Show Labels Inside Shapes", btnType: ButtonType.ToggleButton, icon: "text-width", toolType: "labels", scripts: {onClick:'{ return setInkProperty(this.toolType, value, _readOnly_);}'}},
- { title: "Smart Draw", toolTip: "Draw with GPT", btnType: ButtonType.ToggleButton, icon: "user-pen", toolType: "smartdraw", scripts: {onClick:'{ return setActiveTool(this.toolType, false, _readOnly_);}'}, funcs: {hidden: "IsNoviceMode()"}},
+ { title: "Smart Draw", toolTip: "Draw with GPT", btnType: ButtonType.ToggleButton, icon: "user-pen", toolType: InkTool.SmartDraw, scripts: {onClick:'{ return setActiveTool(this.toolType, false, _readOnly_);}'}, funcs: {hidden: "IsNoviceMode()"}},
];
}
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index 65de85008..ce6b26323 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -35,7 +35,7 @@ type LightboxSavedState = { [key: string]: FieldResult; }; // prettier-ignore
@observer
export class LightboxView extends ObservableReactComponent<LightboxViewProps> {
/**
- * Determines whether a DocumentView is descendant of the lightbox view (or any of its pop-ups like the annotationPalette)
+ * Determines whether a DocumentView is descendant of the lightbox view (or any of its pop-ups like the stickerPalette)
* @param view
* @returns true if a DocumentView is descendant of the lightbox view
*/
@@ -211,7 +211,6 @@ export class LightboxView extends ObservableReactComponent<LightboxViewProps> {
};
togglePalette = () => {
this._showPalette = !this._showPalette;
- // if (this._showPalette === false) AnnotationPalette.Instance.resetPalette(true);
};
togglePen = () => {
Doc.ActiveTool = Doc.ActiveTool === InkTool.Ink ? InkTool.None : InkTool.Ink;
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 65b2702c6..4f62b6fbb 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1285,7 +1285,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
addDrawing = (doc: Doc, opts: DrawingOptions, gptRes: string) => {
const docData = doc[DocData];
docData.title = opts.text.match(/^(.*?)~~~.*$/)?.[1] || opts.text;
- docData.width = opts.size;
+ docData._width = opts.size;
docData.drawingInput = opts.text;
docData.drawingComplexity = opts.complexity;
docData.drawingColored = opts.autoColor;
diff --git a/src/client/views/nodes/imageEditor/ImageEditor.tsx b/src/client/views/nodes/imageEditor/ImageEditor.tsx
index 8f6a7e023..c8fe5adc3 100644
--- a/src/client/views/nodes/imageEditor/ImageEditor.tsx
+++ b/src/client/views/nodes/imageEditor/ImageEditor.tsx
@@ -426,7 +426,7 @@ const ImageEditor = ({ imageEditorOpen, imageEditorSource, imageRootDoc, addDoc
image.onload = async () => {
let finalImg: HTMLImageElement | undefined = image;
let finalImgURL: string = url;
- if (currCutType == BrushMode.IN) {
+ if (currCutType == BrushMode.IN || currCutType == BrushMode.LINE_IN) {
const croppedData = cropImage(image, minX, maxX, minY, maxY);
finalImg = croppedData;
finalImgURL = croppedData.src;
diff --git a/src/client/views/smartdraw/SmartDrawHandler.tsx b/src/client/views/smartdraw/SmartDrawHandler.tsx
index 4c5be047b..83360bb6e 100644
--- a/src/client/views/smartdraw/SmartDrawHandler.tsx
+++ b/src/client/views/smartdraw/SmartDrawHandler.tsx
@@ -82,7 +82,7 @@ export class SmartDrawHandler extends ObservableReactComponent<object> {
/**
* AddDrawing and RemoveDrawing are defined by the other classes that call the smart draw functions (i.e.
- CollectionFreeForm, FormattedTextBox, AnnotationPalette) to define how a drawing document should be added
+ CollectionFreeForm, FormattedTextBox, StickerPalette) to define how a drawing document should be added
or removed in their respective locations (to the freeform canvas, to the sticker palette's preview, etc.)
*/
public AddDrawing: (doc: Doc, opts: DrawingOptions, gptRes: string) => void = unimplementedFunction;
diff --git a/src/fields/InkField.ts b/src/fields/InkField.ts
index f3ff5f11f..702301b31 100644
--- a/src/fields/InkField.ts
+++ b/src/fields/InkField.ts
@@ -11,7 +11,7 @@ export enum InkTool {
None = 'None',
Ink = 'Ink',
Eraser = 'Eraser', // not a real tool, but a class of tools
- SmartDraw = 'Smartdraw',
+ SmartDraw = 'smartdraw',
}
export enum InkInkTool {