diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-05-05 02:48:09 -0700 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-05-05 02:48:09 -0700 |
| commit | df6f48825f37dba00c28bf8d0088b1bd0174095d (patch) | |
| tree | 842488e1ab1c76856b888e2edfc2b6d3f0b58f8c /src/client/views/collections/CollectionTreeView.tsx | |
| parent | aa1eb6ba4217fb48ab10539ca0373b4a1f649192 (diff) | |
| parent | ef78d21ca79b62f57b4f32dfd8309eed5616377c (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index f2b0e3155..297c11e35 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -33,6 +33,7 @@ import { CollectionSubView } from "./CollectionSubView"; import "./CollectionTreeView.scss"; import { CollectionViewType } from './CollectionView'; import React = require("react"); +import { makeTemplate } from '../../util/DropConverter'; export interface TreeViewProps { @@ -743,9 +744,16 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll Doc.GetProto(img).doubleClickView = doubleClickView; } }); + Doc.GetProto(d).type = "buxton"; Doc.GetProto(d).proto = heroView; // all devices "are" heroViews that share the same layout & defaults. Seems better than making them all be independent and copy a layout string // .layout = ImageBox.LayoutString("hero"); }); + const iconBuxtonView = ImageDocument(fallbackImg, { title: "hero", _width: 60, onDoubleClick: ScriptField.MakeScript("deiconifyView(self)") }); + iconBuxtonView.isTemplateDoc = makeTemplate(iconBuxtonView, true, "icon_buxton"); + Doc.UserDoc()["template-icon-view-buxton"] = new PrefetchProxy(iconBuxtonView); + const tempIcons = Doc.GetProto(Cast(Doc.UserDoc()["template-icons"], Doc, null)); + Doc.AddDocToList(tempIcons, "data", iconBuxtonView); + Document.childLayoutTemplate = heroView; Document.childClickedOpenTemplateView = new PrefetchProxy(detailView); Document._viewType = CollectionViewType.Time; |
