From e2bb0381150aa62c041f3fc6beb0a7b0fed7b58e Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Sat, 27 Apr 2019 00:41:29 -0400
Subject: fixed various interactions with marquee

---
 src/client/views/collections/CollectionBaseView.tsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/client/views/collections/CollectionBaseView.tsx')

diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx
index 87b767c93..6cb650770 100644
--- a/src/client/views/collections/CollectionBaseView.tsx
+++ b/src/client/views/collections/CollectionBaseView.tsx
@@ -104,8 +104,7 @@ export class CollectionBaseView extends React.Component<CollectionViewProps> {
             // set the ZoomBasis only if hasn't already been set -- bcz: maybe set/resetting the ZoomBasis should be a parameter to addDocument?
             if (this.collectionViewType === CollectionViewType.Freeform || this.collectionViewType === CollectionViewType.Invalid) {
                 let zoom = this.props.Document.GetNumber(KeyStore.Scale, 1);
-                let screen = this.props.ScreenToLocalTransform().inverse().Scale / (this.props as any).ContentScaling() * zoom;
-                doc.SetNumber(KeyStore.ZoomBasis, screen);
+                doc.SetNumber(KeyStore.ZoomBasis, zoom);
             }
         }
         return true;
-- 
cgit v1.2.3-70-g09d2


From 36fd1b6b6c1ba02be08609176ed7c3e5d0e7f4c4 Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Sat, 27 Apr 2019 09:17:13 -0400
Subject: fixed marquee and doc decorations bugs

---
 src/client/views/collections/CollectionBaseView.tsx             | 2 ++
 src/client/views/collections/collectionFreeForm/MarqueeView.tsx | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/client/views/collections/CollectionBaseView.tsx')

diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx
index 6cb650770..aa8fce923 100644
--- a/src/client/views/collections/CollectionBaseView.tsx
+++ b/src/client/views/collections/CollectionBaseView.tsx
@@ -8,6 +8,7 @@ import { ListField } from '../../../fields/ListField';
 import { NumberField } from '../../../fields/NumberField';
 import { ContextMenu } from '../ContextMenu';
 import { FieldViewProps } from '../nodes/FieldView';
+import { SelectionManager } from '../../util/SelectionManager';
 
 export enum CollectionViewType {
     Invalid,
@@ -173,6 +174,7 @@ export class CollectionBaseView extends React.Component<CollectionViewProps> {
             return true;
         }
         if (this.removeDocument(doc)) {
+            SelectionManager.DeselectAll();
             return addDocument(doc);
         }
         return false;
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index 89308d573..da1170759 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -78,7 +78,9 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
         if (!e.cancelBubble) {
             if (Math.abs(this._lastX - this._downX) > Utils.DRAG_THRESHOLD ||
                 Math.abs(this._lastY - this._downY) > Utils.DRAG_THRESHOLD) {
-                this._visible = true;
+                if (!this._commandExecuted) {
+                    this._visible = true;
+                }
                 e.stopPropagation();
                 e.preventDefault();
             }
@@ -173,7 +175,7 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
             });
 
             this.marqueeInkDelete(inkData);
-            SelectionManager.DeselectAll();
+            // SelectionManager.DeselectAll();
             if (e.key === "r") {
                 let summary = Documents.TextDocument({ x: bounds.left, y: bounds.top, width: 300, height: 100, backgroundColor: "yellow", title: "-summary-" });
                 summary.GetPrototype()!.CreateLink(newCollection.GetPrototype()!);
-- 
cgit v1.2.3-70-g09d2

