aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionPileView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-06-13 22:14:29 -0400
committerbobzel <zzzman@gmail.com>2023-06-13 22:14:29 -0400
commitbf16eca7a84adfdf1c5970e7e4793568ee70325d (patch)
tree44cfd9c63860171c9d890193e7d17f9f6d655a59 /src/client/views/collections/CollectionPileView.tsx
parent8feb55cb8a6dc851f55ff4d7e612896c1045b626 (diff)
fixed updating cached docs when opening a backlinks collection. added some FieldInfo types and added 'enumeration' field display in schema view. fixed bug in schema view column sizing. updated a bunch of standard field names to be more consistent.
Diffstat (limited to 'src/client/views/collections/CollectionPileView.tsx')
-rw-r--r--src/client/views/collections/CollectionPileView.tsx21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/client/views/collections/CollectionPileView.tsx b/src/client/views/collections/CollectionPileView.tsx
index bbc91aa6e..57d9bbb49 100644
--- a/src/client/views/collections/CollectionPileView.tsx
+++ b/src/client/views/collections/CollectionPileView.tsx
@@ -23,7 +23,7 @@ export class CollectionPileView extends CollectionSubView() {
componentDidMount() {
if (this.layoutEngine() !== computePassLayout.name && this.layoutEngine() !== computeStarburstLayout.name) {
- this.Document._pileLayoutEngine = computePassLayout.name;
+ this.Document._freeform_pileEngine = computePassLayout.name;
}
this._originalChrome = this.layoutDoc._chromeHidden;
this.layoutDoc._chromeHidden = true;
@@ -33,7 +33,7 @@ export class CollectionPileView extends CollectionSubView() {
Object.values(this._disposers).forEach(disposer => disposer?.());
}
- layoutEngine = () => StrCast(this.Document._pileLayoutEngine);
+ layoutEngine = () => StrCast(this.Document._freeform_pileEngine);
@undoBatch
addPileDoc = (doc: Doc | Doc[]) => {
@@ -73,28 +73,29 @@ export class CollectionPileView extends CollectionSubView() {
// toggles the pileup between starburst to compact
toggleStarburst = action(() => {
+ this.layoutDoc._freeform_scale = undefined;
if (this.layoutEngine() === computeStarburstLayout.name) {
if (this.rootDoc[Width]() !== NumCast(this.rootDoc._starburstDiameter, 500)) {
this.rootDoc._starburstDiameter = this.rootDoc[Width]();
}
const defaultSize = 110;
- this.rootDoc.x = NumCast(this.rootDoc.x) + this.layoutDoc[Width]() / 2 - NumCast(this.layoutDoc._starburstPileWidth, defaultSize) / 2;
- this.rootDoc.y = NumCast(this.rootDoc.y) + this.layoutDoc[Height]() / 2 - NumCast(this.layoutDoc._starburstPileHeight, defaultSize) / 2;
- this.layoutDoc._width = NumCast(this.layoutDoc._starburstPileWidth, defaultSize);
- this.layoutDoc._height = NumCast(this.layoutDoc._starburstPileHeight, defaultSize);
+ this.rootDoc.x = NumCast(this.rootDoc.x) + this.layoutDoc[Width]() / 2 - NumCast(this.layoutDoc._freeform_pileWidth, defaultSize) / 2;
+ this.rootDoc.y = NumCast(this.rootDoc.y) + this.layoutDoc[Height]() / 2 - NumCast(this.layoutDoc._freeform_pileHeight, defaultSize) / 2;
+ this.layoutDoc._width = NumCast(this.layoutDoc._freeform_pileWidth, defaultSize);
+ this.layoutDoc._height = NumCast(this.layoutDoc._freeform_pileHeight, defaultSize);
DocUtils.pileup(this.childDocs, undefined, undefined, NumCast(this.layoutDoc._width) / 2, false);
this.layoutDoc._freeform_panX = 0;
this.layoutDoc._freeform_panY = -10;
- this.props.Document._pileLayoutEngine = computePassLayout.name;
+ this.props.Document._freeform_pileEngine = computePassLayout.name;
} else {
const defaultSize = NumCast(this.rootDoc._starburstDiameter, 500);
this.rootDoc.x = NumCast(this.rootDoc.x) + this.layoutDoc[Width]() / 2 - defaultSize / 2;
this.rootDoc.y = NumCast(this.rootDoc.y) + this.layoutDoc[Height]() / 2 - defaultSize / 2;
- this.layoutDoc._starburstPileWidth = this.layoutDoc[Width]();
- this.layoutDoc._starburstPileHeight = this.layoutDoc[Height]();
+ this.layoutDoc._freeform_pileWidth = this.layoutDoc[Width]();
+ this.layoutDoc._freeform_pileHeight = this.layoutDoc[Height]();
this.layoutDoc._freeform_panX = this.layoutDoc._freeform_panY = 0;
this.layoutDoc._width = this.layoutDoc._height = defaultSize;
- this.props.Document._pileLayoutEngine = computeStarburstLayout.name;
+ this.props.Document._freeform_pileEngine = computeStarburstLayout.name;
}
});