diff --git a/src/managers/continuous/index.js b/src/managers/continuous/index.js index 663f1cf..c5dadb5 100644 --- a/src/managers/continuous/index.js +++ b/src/managers/continuous/index.js @@ -250,7 +250,7 @@ class ContinuousViewManager extends DefaultViewManager { } visible.push(view); } else { - // this.q.enqueue(view.destroy.bind(view)); + this.q.enqueue(view.destroy.bind(view)); // console.log("hidden " + view.index); clearTimeout(this.trimTimeout); @@ -399,11 +399,9 @@ class ContinuousViewManager extends DefaultViewManager { var bounds = view.bounds(); - view.destroy.bind(view) this.views.remove(view); if(above) { - if(this.settings.axis === "vertical") { this.scrollTo(0, prevTop - bounds.height, true); } else { @@ -598,17 +596,18 @@ class ContinuousViewManager extends DefaultViewManager { } updateAxis(axis, preventUpdate){ + + if (!this.isPaginated) { + axis = "vertical"; + } + this.settings.axis = axis; this.stage && this.stage.axis(axis); this.viewSettings.axis = axis; - if (!this.isPaginated) { - axis = "vertical"; - } - - if (axis === "vertical") { + if (axis === "vertical" && this.layout) { this.layout.spread("none"); } diff --git a/src/managers/default/index.js b/src/managers/default/index.js index ddee3c3..dd7e209 100644 --- a/src/managers/default/index.js +++ b/src/managers/default/index.js @@ -855,6 +855,11 @@ class DefaultViewManager { } updateAxis(axis, preventUpdate){ + + if (!this.isPaginated) { + axis = "vertical"; + } + this.settings.axis = axis; this.stage && this.stage.axis(axis); diff --git a/src/managers/views/iframe.js b/src/managers/views/iframe.js index a001ee6..2345718 100644 --- a/src/managers/views/iframe.js +++ b/src/managers/views/iframe.js @@ -333,6 +333,8 @@ class IframeView { this.prevBounds = size; + this.elementBounds = bounds(this.element); + } @@ -533,10 +535,11 @@ class IframeView { // Stub, override with a custom functions } - bounds() { - if(!this.elementBounds) { + bounds(force) { + if(force || !this.elementBounds) { this.elementBounds = bounds(this.element); } + return this.elementBounds; }