diff options
| author | bob <bcz@cs.brown.edu> | 2019-05-03 14:46:31 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-05-03 14:46:31 -0400 |
| commit | 9b33ac1cb790e88558edb3e4626f5a7b759ea3db (patch) | |
| tree | 5580b2caca6db47320842c57861ae1ec98b8e3f8 /src/client/views/collections/collectionFreeForm | |
| parent | 340b49b4373b2041a167337ec02284e73bfaf3f7 (diff) | |
added make button option. summarize to text notes that can be frozen to resize.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/MarqueeView.tsx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx index 82027a6f2..8c81f6990 100644 --- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx +++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx @@ -154,7 +154,8 @@ export class MarqueeView extends React.Component<MarqueeViewProps> e.stopPropagation(); let bounds = this.Bounds; let selected = this.marqueeSelect().map(d => { - this.props.removeDocument(d); + if (e.key !== "r") + this.props.removeDocument(d); d.x = NumCast(d.x) - bounds.left - bounds.width / 2; d.y = NumCast(d.y) - bounds.top - bounds.height / 2; d.page = -1; @@ -180,12 +181,21 @@ export class MarqueeView extends React.Component<MarqueeViewProps> // SelectionManager.DeselectAll(); if (e.key === "r") { let summary = Docs.TextDocument({ x: bounds.left, y: bounds.top, width: 300, height: 100, backgroundColor: "yellow", title: "-summary-" }); - summary.doc1 = selected[0]; - if (selected.length > 1) - summary.doc2 = selected[1]; - summary.templates = new List<string>([Templates.Summary.Layout]); + summary.maximizedDocs = new List<Doc>(selected); + // summary.doc1 = selected[0]; + // if (selected.length > 1) + // summary.doc2 = selected[1]; + // summary.templates = new List<string>([Templates.Summary.Layout]); this.props.addLiveTextDocument(summary); e.preventDefault(); + let scrpt = this.props.getTransform().inverse().transformPoint(bounds.left, bounds.top); + selected.map(maximizedDoc => { + let maxx = NumCast(maximizedDoc.x, undefined); + let maxy = NumCast(maximizedDoc.y, undefined); + let maxw = NumCast(maximizedDoc.width, undefined); + let maxh = NumCast(maximizedDoc.height, undefined); + maximizedDoc.isIconAnimating = new List<number>([scrpt[0], scrpt[1], maxx, maxy, maxw, maxh, Date.now(), 0]) + }); } else { this.props.addDocument(newCollection, false); |
