From c402d2a68670c50e91bc1a67c58c9537ce8ebdcc Mon Sep 17 00:00:00 2001 From: Jenny Yu Date: Tue, 7 Jun 2022 23:42:15 -0700 Subject: fix: recording box appear on bottom right corner, removed document decorations --- src/client/views/nodes/trails/PresElementBox.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/client/views/nodes/trails') 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() { } else { // if we dont have any recording - const recording = Docs.Create.WebCamDocument("", { _width: 400, _height: 200, hideDocumentButtonBar: true, title: "recording", cloneFieldFilter: new List(["system"]) }); + const recording = Docs.Create.WebCamDocument("", { + _width: 400, _height: 200, + hideDocumentButtonBar: true, + hideDecorationTitle: true, + hideOpenButton: true, + hideDeleteButton: true, + cloneFieldFilter: + new List(["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); } } -- cgit v1.2.3-70-g09d2