Skip to content

Commit

Permalink
Updating issue for string boolean params
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshDSommer committed Jun 23, 2017
1 parent 30e388b commit 1f2eff2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions nativescript-slides.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export declare class SlideContainer extends AbsoluteLayout {
static finishedEvent: string;
pageIndicators: boolean;
pagerOffset: string;
hasNext: boolean;
hasPrevious: boolean;
readonly hasNext: boolean;
readonly hasPrevious: boolean;
loop: boolean;
disablePan: boolean;
pageWidth: number;
readonly pageWidth: any;
angular: boolean;
currentIndex: number;
readonly currentIndex: number;
slideWidth: string;
constructor();
private setupDefaultValues();
Expand Down
9 changes: 6 additions & 3 deletions nativescript-slides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export class SlideContainer extends AbsoluteLayout {
return this._pageIndicators;
}
set pageIndicators(value: boolean) {
if (typeof value === 'string') {
value = (<any>value == 'true');
}
this._pageIndicators = value;
}

Expand Down Expand Up @@ -170,7 +173,7 @@ export class SlideContainer extends AbsoluteLayout {

public constructView(constructor: boolean = false): void {
this.on(AbsoluteLayout.loadedEvent, (data: any) => {
console.log('LOADDED EVENT');
//// console.log('LOADDED EVENT');
if (!this._loaded) {
this._loaded = true;
if (this.angular === true && constructor === true) {
Expand Down Expand Up @@ -214,7 +217,7 @@ export class SlideContainer extends AbsoluteLayout {
app.on(app.orientationChangedEvent, (args: app.OrientationChangedEventData) => {
//event and page orientation didn't seem to alwasy be on the same page so setting it in the time out addresses this.
setTimeout(() => {
console.log('orientationChangedEvent');
// console.log('orientationChangedEvent');
this.width = parseInt(this.slideWidth);
this.eachLayoutChild((view: View) => {
if (view instanceof StackLayout) {
Expand Down Expand Up @@ -317,7 +320,7 @@ export class SlideContainer extends AbsoluteLayout {
}
});
} else {
console.log('invalid index');
// console.log('invalid index');
}
}

Expand Down

0 comments on commit 1f2eff2

Please sign in to comment.