aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionPileView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-04-21 09:49:01 -0400
committerbobzel <zzzman@gmail.com>2021-04-21 09:49:01 -0400
commit3c6fd425c1273f87dc2142038a9ddc48d6159b1b (patch)
tree67c4a7a0f9b730f36ce08bcbc0c7695c82439576 /src/client/views/collections/CollectionPileView.tsx
parenteb7a6f091419318bd85e75787067ef5f036e2659 (diff)
parent45a43e9f0417d6929a6f351fea0cf97fe11b0ef0 (diff)
Fixed errors merging with master
Diffstat (limited to 'src/client/views/collections/CollectionPileView.tsx')
-rw-r--r--src/client/views/collections/CollectionPileView.tsx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionPileView.tsx b/src/client/views/collections/CollectionPileView.tsx
index 6f6cdd5d2..6baf633dd 100644
--- a/src/client/views/collections/CollectionPileView.tsx
+++ b/src/client/views/collections/CollectionPileView.tsx
@@ -2,7 +2,7 @@ import { action, computed } from "mobx";
import { observer } from "mobx-react";
import { Doc, HeightSym, WidthSym } from "../../../fields/Doc";
import { NumCast, StrCast } from "../../../fields/Types";
-import { emptyFunction, setupMoveUpEvents } from "../../../Utils";
+import { emptyFunction, setupMoveUpEvents, returnTrue } from "../../../Utils";
import { DocUtils } from "../../documents/Documents";
import { SelectionManager } from "../../util/SelectionManager";
import { SnappingManager } from "../../util/SnappingManager";
@@ -31,9 +31,16 @@ export class CollectionPileView extends CollectionSubView(doc => doc) {
// returns the contents of the pileup in a CollectionFreeFormView
@computed get contents() {
+ const isStarburst = this.layoutEngine() === "starburst";
const draggingSelf = this.props.isSelected();
- return <div className="collectionPileView-innards" style={{ pointerEvents: this.layoutEngine() === "starburst" || (SnappingManager.GetIsDragging() && !draggingSelf) ? undefined : "none", zIndex: this.layoutEngine() === "starburst" && !SnappingManager.GetIsDragging() ? -10 : "auto" }} >
- <CollectionFreeFormView {...this.props} layoutEngine={this.layoutEngine}
+ return <div className="collectionPileView-innards"
+ style={{
+ pointerEvents: isStarburst || (SnappingManager.GetIsDragging() && !draggingSelf) ? undefined : "none",
+ zIndex: isStarburst && !SnappingManager.GetIsDragging() ? -10 : "auto"
+ }} >
+ <CollectionFreeFormView {...this.props}
+ layoutEngine={this.layoutEngine}
+ childDocumentsActive={isStarburst ? returnTrue : undefined}
addDocument={undoBatch((doc: Doc | Doc[]) => {
(doc instanceof Doc ? [doc] : doc).map((d) => DocUtils.iconify(d));
return this.props.addDocument?.(doc) || false;