From 36f2e1b6849ea3aa9450c5a32f83f5e53a0f1d1d Mon Sep 17 00:00:00 2001 From: Ali Kazemkhanloo Date: Mon, 13 Jul 2020 20:59:29 +0430 Subject: [PATCH 1/2] update layout before calculating location --- src/managers/default/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/managers/default/index.js b/src/managers/default/index.js index 1944889..62ca611 100644 --- a/src/managers/default/index.js +++ b/src/managers/default/index.js @@ -712,6 +712,7 @@ class DefaultViewManager { } paginatedLocation(){ + this.updateLayout(); let visible = this.visible(); let container = this.container.getBoundingClientRect(); From 2c94fa50c61b8d0755d41e5043b99acd4be5d3c8 Mon Sep 17 00:00:00 2001 From: Ali Kazemkhanloo Date: Tue, 14 Jul 2020 22:23:21 +0430 Subject: [PATCH 2/2] call updateLayout inside currentLocation --- src/managers/default/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/default/index.js b/src/managers/default/index.js index 62ca611..152c588 100644 --- a/src/managers/default/index.js +++ b/src/managers/default/index.js @@ -634,6 +634,7 @@ class DefaultViewManager { } currentLocation(){ + this.updateLayout(); if (this.isPaginated && this.settings.axis === "horizontal") { this.location = this.paginatedLocation(); } else { @@ -712,7 +713,6 @@ class DefaultViewManager { } paginatedLocation(){ - this.updateLayout(); let visible = this.visible(); let container = this.container.getBoundingClientRect();