aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionTreeView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-01-24 22:29:31 -0500
committerBob Zeleznik <zzzman@gmail.com>2020-01-24 22:29:31 -0500
commit2fac43821ee90ef914c79923b63425aefcdc8e39 (patch)
tree86e769f89db353349a54bbc7760580280056d1de /src/client/views/collections/CollectionTreeView.tsx
parentbfa73be6dc183e5bbc769bcd9e0b08dc120c054e (diff)
fixes for imagebox's and detailed view
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index 6c6e6b449..485abf8b9 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -637,13 +637,19 @@ export class CollectionTreeView extends CollectionSubView(Document) {
const detailedLayout = Docs.Create.StackingDocument([
ImageDocument(fallbackImg, { title: "activeHero" }),
- MulticolumnDocument([], { title: "data", _height: 100, onChildClick: ScriptField.MakeFunction(`containingCollection.resolvedDataDoc.activeHero = copyField(this.data)`, { containingCollection: Doc.name }) }),
+ MulticolumnDocument([], {
+ title: "data", _height: 100, onChildClick: ScriptField.MakeFunction(
+ `containingCollection.resolvedDataDoc.activeHero = copyField(this.data);
+ containingCollection.resolvedDataDoc.activeHero["activeHero-nativeWidth"] = copyField(this.data["data-nativeWidth"]);
+ containingCollection.resolvedDataDoc.activeHero["activeHero-nativeHeight"] = copyField(this.data["data-nativeHeight"]);
+ `, { containingCollection: Doc.name })
+ }),
TextDocument({ title: "short_description", _autoHeight: true }),
...["year", "company", "degrees_of_freedom"].map(key => TextDocument({ title: key, _height: 30 }))
], { _chromeStatus: "disabled", title: "detailed layout stack" });
detailedLayout.isTemplateDoc = makeTemplate(detailedLayout);
- const cardLayout = ImageDocument(fallbackImg, { isTemplateDoc: true, isTemplateForField: "hero", }); // this acts like a template doc and a template field ... a little weird, but seems to work?
+ const cardLayout = ImageDocument(fallbackImg, { title: "cardLayout", isTemplateDoc: true, isTemplateForField: "hero", }); // this acts like a template doc and a template field ... a little weird, but seems to work?
cardLayout.proto!.layout = ImageBox.LayoutString("hero");
cardLayout.showTitle = "title";
cardLayout.showTitleHover = "titlehover";