aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-01-20 09:58:02 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-01-20 09:58:02 -0500
commit48e4149457f1075748397d4804db9e0c198b5e2e (patch)
tree7559250a066095b4cd4b8d86034484e68e114be2
parente2d6f1d930f0f092d975bd221c45d07a8620efa7 (diff)
templating fixes
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx7
-rw-r--r--src/client/views/nodes/DocumentView.tsx2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index abc902491..0f61756f4 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -31,6 +31,7 @@ import { CurrentUserUtils } from '../../../server/authentication/models/current_
import { ScriptBox } from '../ScriptBox';
import { ImageBox } from '../nodes/ImageBox';
import { makeTemplate } from '../../util/DropConverter';
+import { CollectionDockingView } from './CollectionDockingView';
export interface TreeViewProps {
@@ -634,9 +635,12 @@ export class CollectionTreeView extends CollectionSubView(Document) {
description: "Buxton Layout", icon: "eye", event: () => {
// const [first, second, third] = new Array(3).map(() => Docs.Create.MulticolumnDocument([], {}));
const year = Docs.Create.TextDocument({ title: "year" });
- const wrapper = Docs.Create.FreeformDocument([year], {});
+ const wrapper = Docs.Create.StackingDocument([year], { autoHeight: true, chromeStatus: "disabled" });
wrapper.disableLOD = true;
makeTemplate(wrapper);
+ delete Doc.GetProto(year).showTitle;
+ delete year.showTitle;
+
const detailedLayout = Doc.MakeAlias(wrapper);
const cardLayout = ImageBox.LayoutString("hero");
this.childLayoutPairs.forEach(({ layout }) => {
@@ -644,6 +648,7 @@ export class CollectionTreeView extends CollectionSubView(Document) {
Doc.GetProto(layout).layout_detailed = detailedLayout;
// Doc.ApplyTemplateTo(wrapper, layout, "layout_detailed");
});
+ CollectionDockingView.AddRightSplit(wrapper, undefined);
}
});
const existingOnClick = ContextMenu.Instance.findByDescription("OnClick...");
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 8c7361673..29f658eca 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -759,7 +759,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
return (showTitle && !showTitleHover ? 0 : 0) + 1;
}
- @computed get finalLayoutKey() { return this.props.layoutKey || StrCast(this.props.Document.layoutKey, "layout"); }
+ @computed get finalLayoutKey() { return this.props.layoutKey || "layout"; }
childScaling = () => (this.layoutDoc.fitWidth ? this.props.PanelWidth() / this.nativeWidth : this.props.ContentScaling());
@computed get contents() {
TraceMobx();