aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/nodes/trails/PresBox.tsx1
-rw-r--r--src/client/views/nodes/trails/PresElementBox.tsx6
2 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index 9ab5fb1bd..f818c6e20 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -210,6 +210,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
}
componentDidMount() {
+ this._props.setContentViewBox?.(this);
this._disposers.pause = reaction(
() => SnappingManager.UserPanned,
() => this.pauseAutoPres()
diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index a76805960..957df894c 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -52,7 +52,11 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
// the presentation view that renders this slide
@computed get presBoxView() {
- return this.DocumentView?.().containerViewPath?.().lastElement()?.ComponentView as PresBox;
+ return this.DocumentView?.()
+ .containerViewPath?.()
+ .slice()
+ .reverse()
+ .find(dv => dv?.ComponentView instanceof PresBox)?.ComponentView as PresBox;
}
// the presentation view document that renders this slide