From 0624c1696f84a7f302888e9cd3cf829e3c47c52f Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Mon, 13 May 2019 23:10:40 -0400 Subject: fixed following links to docs that are in workspace --- src/client/util/DocumentManager.ts | 6 ++++-- src/client/views/nodes/ImageBox.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 47bcb153f..49c5d8c19 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -41,7 +41,7 @@ export class DocumentManager { if (!toReturn) { DocumentManager.Instance.DocumentViews.map(view => { let doc = view.props.Document.proto; - if (doc && doc.Id === id) { + if (doc && doc[Id] === id) { toReturn = view; } }); @@ -50,7 +50,9 @@ export class DocumentManager { return toReturn; } - public getDocumentView(toFind: Doc): DocumentView | null { return this.getDocumentViewById(toFind[Id]); } + public getDocumentView(toFind: Doc): DocumentView | null { + return this.getDocumentViewById(toFind[Id]); + } public getDocumentViews(toFind: Doc): DocumentView[] { diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 05742f8d1..6472ae711 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -165,7 +165,7 @@ export class ImageBox extends DocComponent(ImageD else if (field instanceof List) paths = field.filter(val => val instanceof ImageField).map(p => (p as ImageField).url.href); let nativeWidth = FieldValue(this.Document.nativeWidth, (this.props.PanelWidth as any) as string ? Number((this.props.PanelWidth as any) as string) : 50); let interactive = InkingControl.Instance.selectedTool ? "" : "-interactive"; - let id = this.props.id; + let id = this.props.id; // bcz: used to set id = "isExpander" in templates.tsx return (