Skip to content

Commit 3571e30

Browse files
Merge pull request #74 from TheOriginalJosh/updates
Updates
2 parents fafbcda + 344fde2 commit 3571e30

File tree

3 files changed

+9
-42
lines changed

3 files changed

+9
-42
lines changed

README.md

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ To use the slides with Angular2 and the `registerElement` from `nativescript-ang
136136
#### Known issues
137137

138138
* There appears to be a bug with the loop resulting in bad transitions going right to left.
139+
* Currently in Android there is an known issue when a slide component inside of a scroll view.
139140

140141
#### How To: Load slides dynamically
141142
You want to hook into the loaded event of the view and then create your view elements.
@@ -172,46 +173,6 @@ export function onSlideContainerLoaded(args) {
172173

173174
```
174175

175-
#### Smoother panning on Android (For {N} v2.0.0 and below __only__).
176-
177-
To achieve a much smoother drag on android simply go into the gestures.android.js file in the tns-core-modules here
178-
179-
180-
`/node_modules/tns-core-modules/ui/gestures/gestures.android.js`
181-
182-
and change
183-
184-
```javascript
185-
CustomPanGestureDetector.prototype.getMotionEventCenter = function (event) {
186-
var count = event.getPointerCount();
187-
var res = { x: 0, y: 0 };
188-
for (var i = 0; i < count; i++) {
189-
res.x += event.getX(i);
190-
res.y += event.getY(i);
191-
}
192-
res.x /= (count * this.density);
193-
res.y /= (count * this.density);
194-
return res;
195-
};
196-
```
197-
198-
to
199-
```javascript
200-
CustomPanGestureDetector.prototype.getMotionEventCenter = function (event) {
201-
var count = event.getPointerCount();
202-
var res = { x: 0, y: 0 };
203-
for (var i = 0; i < count; i++) {
204-
res.x += event.getRawX();
205-
res.y += event.getRawY();
206-
}
207-
res.x /= (count * this.density);
208-
res.y /= (count * this.density);
209-
return res;
210-
};
211-
```
212-
213-
_please note this will change the panning gesture for your entire project._
214-
215176

216177
### Thanks to these awesome contributors!
217178

@@ -223,6 +184,12 @@ _please note this will change the panning gesture for your entire project._
223184

224185
[Steve McNiven-Scott](https://github.com/sitefinitysteve)
225186

187+
[Leo Caseiro](https://github.com/leocaseiro)
188+
189+
[Todd Anglin](https://github.com/toddanglin)
190+
191+
[Andrew Lo](https://github.com/andrewlo)
192+
226193
And thanks to [Nathan Walker](https://github.com/NathanWalker) for setting up the {N} plugin seed that was used to help get this plugin up and running. More info can be found about it here:
227194
https://github.com/NathanWalker/nativescript-plugin-seed
228195

nativescript-slides.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class SlideContainer extends AbsoluteLayout {
300300
}
301301
}
302302

303-
private applySwipe(pageWidth: number): void {
303+
public applySwipe(pageWidth: number): void {
304304
let previousDelta = -1; //hack to get around ios firing pan event after release
305305
let endingVelocity = 0;
306306
let startTime, deltaTime;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-slides",
3-
"version": "2.1.5",
3+
"version": "2.1.6",
44
"description": "NativeScript Slides plugin.",
55
"main": "nativescript-slides.js",
66
"nativescript": {

0 commit comments

Comments
 (0)