diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-16 18:35:47 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-16 18:35:47 +0530 |
commit | cd6ff8067b2b07f32d2a3f5dccc1b35f96263f89 (patch) | |
tree | efe3b4a059ed80658fa8fc085f5868b63cd1f287 | |
parent | 72bdb86c98323ebb40f391fbdd439ccac58e9ef0 (diff) |
comments
-rw-r--r-- | src/client/views/collections/collectionGrid/CollectionGridView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
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)); } } |