aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/trails/PresElementBox.tsx
diff options
context:
space:
mode:
authorJenny Yu <jennyyu212@outlook.com>2022-06-07 23:42:15 -0700
committerJenny Yu <jennyyu212@outlook.com>2022-06-07 23:42:15 -0700
commitc402d2a68670c50e91bc1a67c58c9537ce8ebdcc (patch)
tree1dcbe41c0ce09b7cc64a8fec39ac4a14760e6e3f /src/client/views/nodes/trails/PresElementBox.tsx
parentd3c89f90d376310cd583ae1c6ac4a7eb4c5a03ac (diff)
fix: recording box appear on bottom right corner, removed document decorations
Diffstat (limited to 'src/client/views/nodes/trails/PresElementBox.tsx')
-rw-r--r--src/client/views/nodes/trails/PresElementBox.tsx17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index 083ca5bea..f1144b32d 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -324,16 +324,23 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
} else {
// if we dont have any recording
- const recording = Docs.Create.WebCamDocument("", { _width: 400, _height: 200, hideDocumentButtonBar: true, title: "recording", cloneFieldFilter: new List<string>(["system"]) });
+ const recording = Docs.Create.WebCamDocument("", {
+ _width: 400, _height: 200,
+ hideDocumentButtonBar: true,
+ hideDecorationTitle: true,
+ hideOpenButton: true,
+ hideDeleteButton: true,
+ cloneFieldFilter:
+ new List<string>(["system"])
+ });
// attach the recording to the slide, and attach the slide to the recording
recording.slides = activeItem
activeItem.recording = recording
- // TODO: Figure out exactly where we want the video to appear
- const pt = this.props.ScreenToLocalTransform().inverse().transformPoint(0, 0);
- recording.x = pt[0];
- recording.y = pt[1];
+ // make recording box appear in the bottom right corner of the screen
+ recording.x = window.innerWidth - recording._width - 20;
+ recording.y = window.innerHeight - recording._height - 20;
Doc.AddDocToList((Doc.UserDoc().myOverlayDocs as Doc), undefined, recording);
}
}