aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/trails/PresElementBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-10 10:52:45 -0400
committerbobzel <zzzman@gmail.com>2022-06-10 10:52:45 -0400
commit78b3b4f194b94a230ff0b07e397b595700d6529f (patch)
tree2ba46ec190d0b71c866fd4d221ffc5aa3955222f /src/client/views/nodes/trails/PresElementBox.tsx
parent910131b13080a2649606ef8a618c77fd81248343 (diff)
fixed some errors
Diffstat (limited to 'src/client/views/nodes/trails/PresElementBox.tsx')
-rw-r--r--src/client/views/nodes/trails/PresElementBox.tsx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index 9ad13eb84..50df00612 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -2,7 +2,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Tooltip } from "@material-ui/core";
import { action, computed, IReactionDisposer, observable, reaction } from "mobx";
import { observer } from "mobx-react";
-import { Doc, DocListCast, Opt } from "../../../../fields/Doc";
+import { Doc, DocListCast, HeightSym, Opt, WidthSym } from "../../../../fields/Doc";
import { Id } from "../../../../fields/FieldSymbols";
import { BoolCast, Cast, NumCast, StrCast } from "../../../../fields/Types";
import { emptyFunction, returnEmptyDoclist, returnFalse, returnTrue, setupMoveUpEvents } from "../../../../Utils";
@@ -328,7 +328,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
@undoBatch
@action
- hideRecording = (e: React.PointerEvent) => {
+ hideRecording = (e: React.MouseEvent) => {
e.stopPropagation()
this.removeAllRecordingInOverlay()
}
@@ -366,8 +366,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
hideDecorationTitle: true,
hideOpenButton: true,
// hideDeleteButton: true,
- cloneFieldFilter:
- new List<string>(["system"])
+ cloneFieldFilter: new List<string>(["system"])
});
// attach the recording to the slide, and attach the slide to the recording
@@ -375,8 +374,8 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
activeItem.recording = recording
// 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;
+ recording.x = window.innerWidth - recording[WidthSym]() - 20;
+ recording.y = window.innerHeight - recording[HeightSym]() - 20;
Doc.AddDocToList((Doc.UserDoc().myOverlayDocs as Doc), undefined, recording);
}
}