From cd6ff8067b2b07f32d2a3f5dccc1b35f96263f89 Mon Sep 17 00:00:00 2001
From: usodhi <61431818+usodhi@users.noreply.github.com>
Date: Thu, 16 Jul 2020 18:35:47 +0530
Subject: comments

---
 src/client/views/collections/collectionGrid/CollectionGridView.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
index 110025313..21f77e47b 100644
--- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx
+++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
@@ -30,7 +30,7 @@ export class CollectionGridView extends CollectionSubView(GridSchema) {
     private _resetListenerDisposer: Opt<Lambda>; // listens for when the reset button is clicked
     @observable private _rowHeight: Opt<number>; // temporary store of row height to make change undoable
     @observable private _scroll: number = 0; // required to make sure the decorations box container updates on scroll
-    private dropLocation: object = {};
+    private dropLocation: object = {}; // sets the drop location for external drops
 
     onChildClickHandler = () => ScriptCast(this.Document.onChildClick);
 
@@ -59,11 +59,11 @@ export class CollectionGridView extends CollectionSubView(GridSchema) {
                 const existing = oldLayouts.find(l => l.i === pair.layout[Id]);
                 if (existing) newLayouts.push(existing);
                 else {
-                    if (Object.keys(this.dropLocation).length) {
+                    if (Object.keys(this.dropLocation).length) { // external drop
                         this.addLayoutItem(newLayouts, this.makeLayoutItem(pair.layout, this.dropLocation as { x: number, y: number }, !this.flexGrid));
                         this.dropLocation = {};
                     }
-                    else {
+                    else { // internal drop
                         this.addLayoutItem(newLayouts, this.makeLayoutItem(pair.layout, this.unflexedPosition(i), !this.flexGrid));
                     }
                 }
-- 
cgit v1.2.3-70-g09d2

