aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionPileView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-04-12 00:09:46 -0400
committerbobzel <zzzman@gmail.com>2022-04-12 00:09:46 -0400
commit064708ec835e873c016af78ccf44578a6cfc9cba (patch)
tree346b27ff6eb8536e126a05d1e299505b9d510547 /src/client/views/collections/CollectionPileView.tsx
parent521b13a1ab34846cf91b9eceb6963ea91789620e (diff)
cleaned up pileView to feel somewhat usable by tweaking icon sizes, and making icon<->doc toggleable by just clicking.
Diffstat (limited to 'src/client/views/collections/CollectionPileView.tsx')
-rw-r--r--src/client/views/collections/CollectionPileView.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionPileView.tsx b/src/client/views/collections/CollectionPileView.tsx
index 0ca0a463e..3d5552f81 100644
--- a/src/client/views/collections/CollectionPileView.tsx
+++ b/src/client/views/collections/CollectionPileView.tsx
@@ -11,6 +11,7 @@ import { CollectionFreeFormView } from "./collectionFreeForm/CollectionFreeFormV
import "./CollectionPileView.scss";
import { CollectionSubView } from "./CollectionSubView";
import React = require("react");
+import { ScriptField } from "../../../fields/ScriptField";
@observer
export class CollectionPileView extends CollectionSubView() {
@@ -47,6 +48,10 @@ export class CollectionPileView extends CollectionSubView() {
return this.props.moveDocument?.(doc, targetCollection, addDoc) || false;
}
+ toggleIcon = () => {
+ return ScriptField.MakeScript("documentView.iconify()", { documentView: "any" });
+ }
+
// returns the contents of the pileup in a CollectionFreeFormView
@computed get contents() {
const isStarburst = this.layoutEngine() === "starburst";
@@ -60,6 +65,7 @@ export class CollectionPileView extends CollectionSubView() {
layoutEngine={this.layoutEngine}
childDocumentsActive={isStarburst ? returnTrue : undefined}
addDocument={this.addPileDoc}
+ childClickScript={this.toggleIcon()}
moveDocument={this.removePileDoc} />
</div>;
}