diff options
author | bobzel <zzzman@gmail.com> | 2024-08-29 23:54:47 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-08-29 23:54:47 -0400 |
commit | 9975a253efc8ddf5b1cfbe78538322a7bd27013e (patch) | |
tree | dd2eab28237fc9c110ad982606afc094007e3bb2 | |
parent | d1fad65d5f3bfb2ed7d2b94af2c3c609a2090545 (diff) |
allow images to be added to annotation palette
-rw-r--r-- | src/client/views/smartdraw/AnnotationPalette.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/smartdraw/AnnotationPalette.tsx b/src/client/views/smartdraw/AnnotationPalette.tsx index 22b8b7b67..72364be09 100644 --- a/src/client/views/smartdraw/AnnotationPalette.tsx +++ b/src/client/views/smartdraw/AnnotationPalette.tsx @@ -111,7 +111,7 @@ export class AnnotationPalette extends ObservableReactComponent<AnnotationPalett if (!doc.savedAsAnno) { const clone = await Doc.MakeClone(doc); clone.clone.title = doc.title; - const image = (await AnnotationPalette.getIcon(doc))?.[Copy](); + const image = ((await AnnotationPalette.getIcon(doc)) ?? ImageCast(doc[Doc.LayoutFieldKey(doc)]))?.[Copy](); if (image) { const imageTemplate = makeUserTemplateImage(clone.clone, image); Doc.AddDocToList(Doc.MyAnnos, 'data', imageTemplate); |