Skip to content

Commit 1f2eff2

Browse files
committed
Updating issue for string boolean params
1 parent 30e388b commit 1f2eff2

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

nativescript-slides.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ export declare class SlideContainer extends AbsoluteLayout {
2929
static finishedEvent: string;
3030
pageIndicators: boolean;
3131
pagerOffset: string;
32-
hasNext: boolean;
33-
hasPrevious: boolean;
32+
readonly hasNext: boolean;
33+
readonly hasPrevious: boolean;
3434
loop: boolean;
3535
disablePan: boolean;
36-
pageWidth: number;
36+
readonly pageWidth: any;
3737
angular: boolean;
38-
currentIndex: number;
38+
readonly currentIndex: number;
3939
slideWidth: string;
4040
constructor();
4141
private setupDefaultValues();

nativescript-slides.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export class SlideContainer extends AbsoluteLayout {
7272
return this._pageIndicators;
7373
}
7474
set pageIndicators(value: boolean) {
75+
if (typeof value === 'string') {
76+
value = (<any>value == 'true');
77+
}
7578
this._pageIndicators = value;
7679
}
7780

@@ -170,7 +173,7 @@ export class SlideContainer extends AbsoluteLayout {
170173

171174
public constructView(constructor: boolean = false): void {
172175
this.on(AbsoluteLayout.loadedEvent, (data: any) => {
173-
console.log('LOADDED EVENT');
176+
//// console.log('LOADDED EVENT');
174177
if (!this._loaded) {
175178
this._loaded = true;
176179
if (this.angular === true && constructor === true) {
@@ -214,7 +217,7 @@ export class SlideContainer extends AbsoluteLayout {
214217
app.on(app.orientationChangedEvent, (args: app.OrientationChangedEventData) => {
215218
//event and page orientation didn't seem to alwasy be on the same page so setting it in the time out addresses this.
216219
setTimeout(() => {
217-
console.log('orientationChangedEvent');
220+
// console.log('orientationChangedEvent');
218221
this.width = parseInt(this.slideWidth);
219222
this.eachLayoutChild((view: View) => {
220223
if (view instanceof StackLayout) {
@@ -317,7 +320,7 @@ export class SlideContainer extends AbsoluteLayout {
317320
}
318321
});
319322
} else {
320-
console.log('invalid index');
323+
// console.log('invalid index');
321324
}
322325
}
323326

0 commit comments

Comments
 (0)