refactor(playground): update gestures playground to use latest hammer.js
This commit is contained in:
parent
5494169fb4
commit
bad58824a0
1
build.sh
1
build.sh
|
@ -67,6 +67,7 @@ if [[ ${BUILD_ALL} == true ]]; then
|
||||||
ln -s ../../../../node_modules/reflect-metadata/Reflect.js .
|
ln -s ../../../../node_modules/reflect-metadata/Reflect.js .
|
||||||
ln -s ../../../../node_modules/rxjs .
|
ln -s ../../../../node_modules/rxjs .
|
||||||
ln -s ../../../../node_modules/angular/angular.js .
|
ln -s ../../../../node_modules/angular/angular.js .
|
||||||
|
ln -s ../../../../node_modules/hammerjs/hammer.js .
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
echo "====== Copying files needed for benchmarks ====="
|
echo "====== Copying files needed for benchmarks ====="
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,13 +16,11 @@ class GesturesCmp {
|
||||||
pinchScale: number = 1;
|
pinchScale: number = 1;
|
||||||
rotateAngle: number = 0;
|
rotateAngle: number = 0;
|
||||||
|
|
||||||
onSwipe(event: any /** TODO #9100 */): void {
|
onSwipe(event: HammerInput): void { this.swipeDirection = event.deltaX > 0 ? 'right' : 'left'; }
|
||||||
this.swipeDirection = event.deltaX > 0 ? 'right' : 'left';
|
|
||||||
}
|
|
||||||
|
|
||||||
onPinch(event: any /** TODO #9100 */): void { this.pinchScale = event.scale; }
|
onPinch(event: HammerInput): void { this.pinchScale = event.scale; }
|
||||||
|
|
||||||
onRotate(event: any /** TODO #9100 */): void { this.rotateAngle = event.rotation; }
|
onRotate(event: HammerInput): void { this.rotateAngle = event.rotation; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@NgModule({declarations: [GesturesCmp], bootstrap: [GesturesCmp], imports: [BrowserModule]})
|
@NgModule({declarations: [GesturesCmp], bootstrap: [GesturesCmp], imports: [BrowserModule]})
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/hammerjs": {
|
"@types/hammerjs": {
|
||||||
"version": "2.0.22-alpha",
|
"version": "2.0.33",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/jasmine": {
|
"@types/jasmine": {
|
||||||
|
@ -3490,6 +3490,10 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"hammerjs": {
|
||||||
|
"version": "2.0.8",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"handlebars": {
|
"handlebars": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.5",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/hammerjs": {
|
"@types/hammerjs": {
|
||||||
"version": "2.0.22-alpha",
|
"version": "2.0.33",
|
||||||
"from": "@types/hammerjs@latest",
|
"from": "@types/hammerjs@latest",
|
||||||
"resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.22-alpha.tgz",
|
"resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.33.tgz",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/jasmine": {
|
"@types/jasmine": {
|
||||||
|
@ -5066,6 +5066,12 @@
|
||||||
"resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"hammerjs": {
|
||||||
|
"version": "2.0.8",
|
||||||
|
"from": "hammerjs@latest",
|
||||||
|
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"handlebars": {
|
"handlebars": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.5",
|
||||||
"from": "handlebars@>=4.0.2 <5.0.0",
|
"from": "handlebars@>=4.0.2 <5.0.0",
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/angularjs": "^1.5.13-alpha",
|
"@types/angularjs": "^1.5.13-alpha",
|
||||||
"@types/fs-extra": "0.0.22-alpha",
|
"@types/fs-extra": "0.0.22-alpha",
|
||||||
"@types/hammerjs": "^2.0.22-alpha",
|
"@types/hammerjs": "^2.0.33",
|
||||||
"@types/jasmine": "^2.2.22-alpha",
|
"@types/jasmine": "^2.2.22-alpha",
|
||||||
"@types/node": "^4.0.22-alpha",
|
"@types/node": "^4.0.22-alpha",
|
||||||
"@types/protractor": "^1.5.11-alpha",
|
"@types/protractor": "^1.5.11-alpha",
|
||||||
|
@ -51,6 +51,7 @@
|
||||||
"gulp-connect": "^2.3.1",
|
"gulp-connect": "^2.3.1",
|
||||||
"gulp-conventional-changelog": "^1.1.0",
|
"gulp-conventional-changelog": "^1.1.0",
|
||||||
"gulp-tslint": "^6.1.1",
|
"gulp-tslint": "^6.1.1",
|
||||||
|
"hammerjs": "^2.0.8",
|
||||||
"incremental-dom": "^0.4.1",
|
"incremental-dom": "^0.4.1",
|
||||||
"jasmine": "^2.4.1",
|
"jasmine": "^2.4.1",
|
||||||
"jasmine-core": "^2.3.4",
|
"jasmine-core": "^2.3.4",
|
||||||
|
|
Loading…
Reference in New Issue