2016-05-19 14:31:21 -07:00
|
|
|
import {bootstrap} from '@angular/platform-browser';
|
2016-04-28 17:50:03 -07:00
|
|
|
import {Component} from '@angular/core';
|
2015-05-22 14:39:00 +02:00
|
|
|
|
2016-03-08 13:36:48 -08:00
|
|
|
@Component({selector: 'gestures-app', templateUrl: 'template.html'})
|
2015-05-22 14:39:00 +02:00
|
|
|
class GesturesCmp {
|
|
|
|
|
swipeDirection: string = '-';
|
|
|
|
|
pinchScale: number = 1;
|
|
|
|
|
rotateAngle: number = 0;
|
|
|
|
|
|
|
|
|
|
onSwipe(event): void { this.swipeDirection = event.deltaX > 0 ? 'right' : 'left'; }
|
|
|
|
|
|
|
|
|
|
onPinch(event): void { this.pinchScale = event.scale; }
|
|
|
|
|
|
|
|
|
|
onRotate(event): void { this.rotateAngle = event.rotation; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function main() {
|
|
|
|
|
bootstrap(GesturesCmp);
|
|
|
|
|
}
|