aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-05-16 01:17:44 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-05-16 01:17:44 -0400
commit6e767972574c9cd8a2cd1e10a8fa327839ca3525 (patch)
treeb4294b8a4d1ce7ae0c23da5660c0710fa8acc6f3 /src/client/views/collections
parent53351f6c5b448b93f2865eb38868bddb95ec4c1d (diff)
changes to make maximizing stuff apply to data documents. problem with zooiming after resizing a summarized doc
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index 865bae729..c063115e7 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -264,7 +264,6 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
// SelectionManager.DeselectAll();
if (e.key === "s" || e.key === "r" || e.key === "p") {
e.preventDefault();
- let scrpt = this.props.getTransform().inverse().transformPoint(bounds.left, bounds.top);
let summary = Docs.TextDocument({ x: bounds.left, y: bounds.top, width: 300, height: 100, backgroundColor: "yellow", title: "-summary-" });
let dataUrl = await htmlToImage.toPng(this._mainCont.current!, { width: bounds.width, height: bounds.height, quality: 1 });
@@ -272,12 +271,15 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
summary.proto!.templates = new List<string>([Templates.ImageOverlay(Math.min(50, bounds.width), bounds.height * Math.min(50, bounds.width) / bounds.width, "thumbnail")]);
if (e.key === "s" || e.key === "p") {
- summary.proto!.maximizeOnRight = true;
+ // summary.proto!.maximizeOnRight = true;
newCollection.proto!.summaryDoc = summary;
selected = [newCollection];
+ newCollection.proto!.isMinimized = true;
+ this.props.addDocument(newCollection, false);
}
- summary.proto!.summarizedDocs = new List<Doc>(selected);
+ summary.proto!.summarizedDocs = new List<Doc>(selected.map(s => s.proto!));
//summary.proto!.isButton = true;
+ let scrpt = this.props.getTransform().inverse().transformPoint(bounds.left, bounds.top);
selected.map(summarizedDoc => {
let maxx = NumCast(summarizedDoc.x, undefined);
let maxy = NumCast(summarizedDoc.y, undefined);