From 3e93857b4dfdc09a4dce7ec12ca0dbc60b727fb1 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 22 Feb 2023 16:16:45 -0500 Subject: fixes for restoring layouts in presentations and link following. --- src/client/views/collections/CollectionMenu.tsx | 2 +- .../collections/collectionFreeForm/CollectionFreeFormView.tsx | 2 +- src/client/views/nodes/ImageBox.tsx | 2 +- src/client/views/nodes/trails/PresElementBox.tsx | 11 +++++------ 4 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index c83f4e689..17f02711d 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -746,7 +746,7 @@ export class CollectionFreeFormViewChrome extends React.Component() { */ @undoBatch @action - updateCapturedContainerLayout = (targetDoc: Doc, activeItem: Doc) => { + updateCapturedContainerLayout = (presTargetDoc: Doc, activeItem: Doc) => { + const targetDoc = DocCast(presTargetDoc.annotationOn) ?? presTargetDoc; activeItem.presX = NumCast(targetDoc.x); activeItem.presY = NumCast(targetDoc.y); activeItem.presRot = NumCast(targetDoc.rotation); activeItem.presWidth = NumCast(targetDoc.width); activeItem.presHeight = NumCast(targetDoc.height); + activeItem.presPinLayout = true; }; /** * Method called for updating the view of the currently selected document -- cgit v1.2.3-70-g09d2