aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-08-30 00:06:12 -0400
committerbobzel <zzzman@gmail.com>2024-08-30 00:06:12 -0400
commitcbb74abac69e6f4e6f7f813e57a5cc3280647d39 (patch)
tree8e187a9598c4807e9340eb9d184d6ef7a19c2372
parent9975a253efc8ddf5b1cfbe78538322a7bd27013e (diff)
parentc36607691e0b7f5c04f3209a64958f5e51ddd785 (diff)
Merge branch 'master' into eleanor-gptdraw
-rw-r--r--src/client/views/pdf/GPTPopup/GPTPopup.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
index 0920b1bd3..a37e73e27 100644
--- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx
+++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
@@ -268,7 +268,7 @@ export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
* Transfers the image urls to actual image docs
*/
private transferToImage = (source: string) => {
- const textAnchor = this.imgTargetDoc;
+ const textAnchor = this.textAnchor ?? this.imgTargetDoc;
if (!textAnchor) return;
const newDoc = Docs.Create.ImageDocument(source, {
x: NumCast(textAnchor.x) + NumCast(textAnchor._width) + 10,