aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocComponent.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-07-17 12:18:25 -0400
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-07-17 12:18:25 -0400
commit824093d9572a3ba991544b481447199fc653c61a (patch)
treed55fe82768a397521c1e4ae9c8d4c5823bc6d9aa /src/client/views/DocComponent.tsx
parentd6e313be26323d7e8265714665c71e2d571764ae (diff)
parent212d49772c1c2aa3d0a9382ef144dc3037faa8c2 (diff)
merging
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r--src/client/views/DocComponent.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx
index fc2a968fe..6168e5447 100644
--- a/src/client/views/DocComponent.tsx
+++ b/src/client/views/DocComponent.tsx
@@ -112,7 +112,7 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps, T
styleFromLayoutString = (scale: number) => {
const style: { [key: string]: any } = {};
- const divKeys = ["width", "height", "fontSize", "left", "background", "top", "pointerEvents", "position"];
+ const divKeys = ["width", "height", "fontSize", "left", "background", "left", "right", "top", "bottom", "pointerEvents", "position"];
const replacer = (match: any, expr: string, offset: any, string: any) => { // bcz: this executes a script to convert a property expression string: { script } into a value
return ScriptField.MakeFunction(expr, { self: Doc.name, this: Doc.name, scale: "number" })?.script.run({ self: this.rootDoc, this: this.layoutDoc, scale }).result as string || "";
};
@@ -147,7 +147,10 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps, T
leavePushpin && DocUtils.LeavePushpin(doc, annotationKey ?? this.annotationKey);
Doc.RemoveDocFromList(targetDataDoc, annotationKey ?? this.annotationKey, doc);
doc.context = undefined;
- recent && Doc.AddDocToList(recent, "data", doc, undefined, true, true);
+ if (recent) {
+ Doc.RemoveDocFromList(recent, "data", doc);
+ Doc.AddDocToList(recent, "data", doc, undefined, true, true);
+ }
});
this.props.select(false);
return true;