aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/trails/PresElementBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/trails/PresElementBox.tsx')
-rw-r--r--src/client/views/nodes/trails/PresElementBox.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index bc1cea505..23c80253c 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -234,6 +234,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
if (PresBox.Instance._selectedArray.has(this.rootDoc)) {
PresBox.Instance._selectedArray.delete(this.rootDoc);
}
+ this.hideRecording();
e.stopPropagation();
});
@@ -285,10 +286,10 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
@undoBatch
@action
- hideRecording = (targetDoc: Doc, activeItem: Doc) => {
+ hideRecording = () => {
console.log("hide recording")
DocListCast((Doc.UserDoc().myOverlayDocs as Doc).data).forEach((doc) => {
- if (doc.slides === activeItem) {
+ if (doc.slides === this.rootDoc) {
Doc.RemoveDocFromList((Doc.UserDoc().myOverlayDocs as Doc), undefined, doc);
}
})
@@ -322,6 +323,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
const pt = this.props.ScreenToLocalTransform().inverse().transformPoint(0, 0);
recording.x = pt[0];
recording.y = pt[1];
+ console.log(pt)
Doc.AddDocToList((Doc.UserDoc().myOverlayDocs as Doc), undefined, recording);
}
}
@@ -404,7 +406,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
{this.recordingIsInOverlay ?
<Tooltip title={<><div className="dash-tooltip">{"Hide Recording"}</div></>}>
<div className="slideButton"
- onClick={() => this.hideRecording(targetDoc, activeItem)}
+ onClick={this.hideRecording}
style={{ fontWeight: 700 }}>
<FontAwesomeIcon icon={"video-slash"} onPointerDown={e => e.stopPropagation()} />
</div>