nativescript-slides
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -245,15 +245,19 @@ "use strict"; | ||
app.on(app.orientationChangedEvent, function (args) { | ||
_this._pageWidth = Platform.screen.mainScreen.widthDIPs; | ||
_this.eachLayoutChild(function (view) { | ||
if (view instanceof stack_layout_1.StackLayout) { | ||
absolute_layout_1.AbsoluteLayout.setLeft(view, _this.pageWidth); | ||
view.width = _this.pageWidth; | ||
setTimeout(function () { | ||
_this._pageWidth = Platform.screen.mainScreen.widthDIPs; | ||
_this.eachLayoutChild(function (view) { | ||
if (view instanceof stack_layout_1.StackLayout) { | ||
absolute_layout_1.AbsoluteLayout.setLeft(view, _this.pageWidth); | ||
view.width = _this.pageWidth; | ||
} | ||
}); | ||
if (_this.disablePan === false) { | ||
_this.applySwipe(_this.pageWidth); | ||
} | ||
}); | ||
if (_this.disablePan === false) { | ||
_this.applySwipe(_this.pageWidth); | ||
} | ||
var topOffset = Platform.screen.mainScreen.heightDIPs - 105; | ||
absolute_layout_1.AbsoluteLayout.setTop(_this._footer, topOffset); | ||
_this.currentPanel.panel.translateX = -_this.pageWidth; | ||
var topOffset = Platform.screen.mainScreen.heightDIPs - 105; | ||
if (_this.pageIndicators) { | ||
absolute_layout_1.AbsoluteLayout.setTop(_this._footer, topOffset); | ||
} | ||
_this.currentPanel.panel.translateX = -_this.pageWidth; | ||
}, 100); | ||
}); | ||
@@ -260,0 +264,0 @@ } |
@@ -13,4 +13,5 @@ import * as app from 'application'; | ||
import {Image} from 'ui/image'; | ||
import * as imageSource from 'image-source'; | ||
// declare const android:any; | ||
let LayoutParams: any; | ||
@@ -248,16 +249,21 @@ if (app.android) { | ||
app.on(app.orientationChangedEvent, (args: app.OrientationChangedEventData) => { | ||
this._pageWidth = Platform.screen.mainScreen.widthDIPs; | ||
this.eachLayoutChild((view: View) => { | ||
if (view instanceof StackLayout) { | ||
AbsoluteLayout.setLeft(view, this.pageWidth); | ||
view.width = this.pageWidth; | ||
//event and page orientation didn't seem to alwasy be on the same page so setting it in the time out addresses this. | ||
setTimeout(() => { | ||
this._pageWidth = Platform.screen.mainScreen.widthDIPs; | ||
this.eachLayoutChild((view: View) => { | ||
if (view instanceof StackLayout) { | ||
AbsoluteLayout.setLeft(view, this.pageWidth); | ||
view.width = this.pageWidth; | ||
} | ||
}); | ||
if (this.disablePan === false) { | ||
this.applySwipe(this.pageWidth); | ||
} | ||
}); | ||
if (this.disablePan === false) { | ||
this.applySwipe(this.pageWidth); | ||
} | ||
let topOffset = Platform.screen.mainScreen.heightDIPs - 105; | ||
AbsoluteLayout.setTop(this._footer, topOffset); | ||
this.currentPanel.panel.translateX = -this.pageWidth; | ||
let topOffset = Platform.screen.mainScreen.heightDIPs - 105; | ||
if (this.pageIndicators) { | ||
AbsoluteLayout.setTop(this._footer, topOffset); | ||
} | ||
this.currentPanel.panel.translateX = -this.pageWidth; | ||
}, 100); | ||
}); | ||
@@ -264,0 +270,0 @@ } |
{ | ||
"name": "nativescript-slides", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "NativeScript Slides plugin.", | ||
@@ -5,0 +5,0 @@ "main": "nativescript-slides.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68784
1273