aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-02-10 18:11:36 -0500
committerbob <bcz@cs.brown.edu>2020-02-10 18:11:36 -0500
commita547bf10571c6e45f59fb8205171123da2560c75 (patch)
treea5dfc28ad539906f66a91a6188d836c06d3fb124 /src/client/documents/Documents.ts
parente613070b306c05356173c9c0b53f6114356c280b (diff)
parent8442f8720c2ad090358ef664f6b0806b23a6e145 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index f9dab9738..93500b920 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -373,10 +373,11 @@ export namespace Docs {
delete device.__images;
const { ImageDocument, StackingDocument } = Docs.Create;
if (Array.isArray(__images)) {
- const deviceImages = __images.map((url, i) => ImageDocument(Utils.prepend(url), { title: `image${i}.${extname(url)}` }));
+ const constructed = __images.map(relative => Utils.prepend(relative));
+ const deviceImages = constructed.map((url, i) => ImageDocument(url, { title: `image${i}.${extname(url)}` }));
const doc = StackingDocument(deviceImages, { title: device.title, _LODdisable: true });
const protoDoc = Doc.GetProto(doc);
- protoDoc.hero = new ImageField(__images[0]);
+ protoDoc.hero = new ImageField(constructed[0]);
Docs.Get.DocumentHierarchyFromJson(device, undefined, protoDoc);
Doc.AddDocToList(parentProto, "data", doc);
}