nativescript-slides
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -22,2 +22,3 @@ import { AbsoluteLayout } from 'ui/layouts/absolute-layout'; | ||
private timer_reference; | ||
private _ng2; | ||
hasNext: boolean; | ||
@@ -31,2 +32,3 @@ hasPrevious: boolean; | ||
pageWidth: number; | ||
ng2: boolean; | ||
android: any; | ||
@@ -33,0 +35,0 @@ ios: any; |
@@ -114,2 +114,12 @@ "use strict"; | ||
}); | ||
Object.defineProperty(SlideContainer.prototype, "ng2", { | ||
get: function () { | ||
return this._ng2; | ||
}, | ||
set: function (value) { | ||
this._ng2 = value; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(SlideContainer.prototype, "android", { | ||
@@ -142,2 +152,5 @@ get: function () { | ||
} | ||
if (this._ng2 == null) { | ||
this._ng2 = false; | ||
} | ||
}; | ||
@@ -147,2 +160,5 @@ SlideContainer.prototype.constructView = function () { | ||
this.setupDefaultValues(); | ||
if (this.ng2) { | ||
return; | ||
} | ||
this.on(absolute_layout_1.AbsoluteLayout.loadedEvent, function (data) { | ||
@@ -149,0 +165,0 @@ if (!_this._loaded) { |
@@ -45,2 +45,3 @@ import * as app from 'application'; | ||
private timer_reference: number; | ||
private _ng2: boolean; | ||
@@ -97,2 +98,10 @@ get hasNext(): boolean { | ||
get ng2(): boolean { | ||
return this._ng2; | ||
} | ||
set ng2(value: boolean) { | ||
this._ng2 = value; | ||
} | ||
get android(): any { | ||
@@ -127,6 +136,15 @@ return; | ||
} | ||
if (this._ng2 == null) { | ||
this._ng2 = false; | ||
} | ||
} | ||
constructView(): void { | ||
public constructView(): void { | ||
this.setupDefaultValues(); | ||
// if being used in an ng2 app we want to prevent it from excuting the constructView | ||
// until it is called manually in ngAfterViewInit. | ||
if (this.ng2) { | ||
return; | ||
} | ||
@@ -133,0 +151,0 @@ this.on(AbsoluteLayout.loadedEvent, (data: any) => { |
{ | ||
"name": "nativescript-slides", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "NativeScript Slides plugin.", | ||
@@ -5,0 +5,0 @@ "main": "nativescript-slides.js", |
@@ -78,2 +78,5 @@ # NativeScript Slides for iOS and Android | ||
#### Angular 2 compatibility | ||
To use the slides with Angular2 and the `registerElement` from `nativescript-angular` you will want to set the `SlideContainer`'s property of `ng2` to `true`. Then in your angular component in the `ngAfterViewInit`. you will want to have an instance of your slide container to call the function `constructView()`. | ||
#### Android Optional Attributes | ||
@@ -83,3 +86,3 @@ - `androidTranslucentStatusBar`: boolean - If true, the Android status bar will be translucent on devices that support it. (Android sdk >= 19). | ||
###Plugin Development Work Flow: | ||
#### Plugin Development Work Flow: | ||
@@ -91,7 +94,7 @@ * Clone repository to your machine. | ||
###Known issues | ||
#### Known issues | ||
* There apears to be a bug with the loop resulting in bad transitions going right to left. | ||
### Smoother panning on Android (For {N} v2.0.0 and below __only__). | ||
#### Smoother panning on Android (For {N} v2.0.0 and below __only__). | ||
@@ -148,2 +151,5 @@ To achieve a much smoother drag on android simply go into the gestures.android.js file in the tns-core-modules here | ||
##Contributing guidelines | ||
[Contributing guidelines](https://github.com/TheOriginalJosh/nativescript-swiss-army-knife/blob/master/CONTRIBUTING.md) | ||
##License | ||
@@ -150,0 +156,0 @@ |
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
59436
1080
156