diff options
Diffstat (limited to 'src/client/views')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/MarqueeView.tsx | 3 | ||||
| -rw-r--r-- | src/client/views/nodes/PresBox.tsx | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx index 8dbc2bd43..7e02673f4 100644 --- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx +++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx @@ -401,6 +401,9 @@ export class MarqueeView extends React.Component<SubCollectionViewProps & Marque if (!DocumentManager.Instance.getDocumentView(curPres)) { CollectionDockingView.AddRightSplit(curPres); } + const myPresentations = Doc.UserDoc().myPresentations as Doc; + const presData = DocListCast(myPresentations.data); + if (!presData.includes(curPres)) Doc.AddDocToList(myPresentations, "data", curPres); if (e instanceof KeyboardEvent ? e.key === "c" : true) { const x = this.Bounds.left + this.Bounds.width / 2; const y = this.Bounds.top + this.Bounds.height / 2; diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index f6325433e..31fd1828f 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -509,7 +509,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> case 'none': default: output = 'None'; break; //None } return output; - }) + }); whenActiveChanged = action((isActive: boolean) => this.props.whenActiveChanged(this._isChildActive = isActive)); // For dragging documents into the presentation trail @@ -527,9 +527,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> return true; } childLayoutTemplate = () => this.rootDoc._viewType !== CollectionViewType.Stacking ? undefined : this.presElement; - removeDocument = (doc: Doc) => { - Doc.RemoveDocFromList(this.dataDoc, this.fieldKey, doc); - }; + removeDocument = (doc: Doc) => { Doc.RemoveDocFromList(this.dataDoc, this.fieldKey, doc); }; getTransform = () => this.props.ScreenToLocalTransform().translate(-5, -65);// listBox padding-left and pres-box-cont minHeight panelHeight = () => this.props.PanelHeight() - 40; active = (outsideReaction?: boolean) => ((Doc.GetSelectedTool() === InkTool.None && !this.layoutDoc.isBackground) && |
