/* tslint:disable:no-unused-variable */ // // # Gestures // Detecting user gestures requires the "ui/gestures" module. // ``` JavaScript import gestures = require("ui/gestures"); // ``` // import labelModule = require("ui/label"); export var test_DummyTestForSnippetOnly0 = function () { // // ### Double Tap // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.doubleTap, function (args: gestures.GestureEventData) { console.log("Double Tap"); }); // ``` // } export var test_DummyTestForSnippetOnly01 = function () { // // ### Double Tap // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("doubleTap", function (args: gestures.GestureEventData) { console.log("Double Tap"); }); // ``` // } export var test_DummyTestForSnippetOnly1 = function () { // // ### Long Press // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.longPress, function (args: gestures.GestureEventData) { console.log("Long Press"); }); // ``` // } export var test_DummyTestForSnippetOnly11 = function () { // // ### Long Press // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("longPress", function (args: gestures.GestureEventData) { console.log("Long Press"); }); // ``` // } export var test_DummyTestForSnippetOnly2 = function () { // // ### Pan // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.pan, function (args: gestures.PanGestureEventData) { console.log("Pan deltaX:" + args.deltaX + "; deltaY:" + args.deltaY + ";"); }); // ``` // } export var test_DummyTestForSnippetOnly22 = function () { // // ### Pan // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("pan", function (args: gestures.PanGestureEventData) { console.log("Pan deltaX:" + args.deltaX + "; deltaY:" + args.deltaY + ";"); }); // ``` // } export var test_DummyTestForSnippetOnly3 = function () { // // ### Pinch // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.pinch, function (args: gestures.PinchGestureEventData) { console.log("Pinch scale: " + args.scale); }); // ``` // } export var test_DummyTestForSnippetOnly33 = function () { // // ### Pinch // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("pinch", function (args: gestures.PinchGestureEventData) { console.log("Pinch scale: " + args.scale); }); // ``` // } export var test_DummyTestForSnippetOnly4 = function () { // // ### Rotation // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.rotation, function (args: gestures.RotationGestureEventData) { console.log("Rotation: " + args.rotation); }); // ``` // } export var test_DummyTestForSnippetOnly44 = function () { // // ### Rotation // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("rotation", function (args: gestures.RotationGestureEventData) { console.log("Rotation: " + args.rotation); }); // ``` // } export var test_DummyTestForSnippetOnly5 = function () { // // ### Swipe // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.swipe, function (args: gestures.SwipeGestureEventData) { console.log("Swipe direction: " + args.direction); }); // ``` // } export var test_DummyTestForSnippetOnly55 = function () { // // ### Swipe // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("swipe", function (args: gestures.SwipeGestureEventData) { console.log("Swipe direction: " + args.direction); }); // ``` // } export var test_DummyTestForSnippetOnly6 = function () { // // ### Tap // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.tap, function (args: gestures.GestureEventData) { console.log("Tap"); }); // ``` // } export var test_DummyTestForSnippetOnly66 = function () { // // ### Tap // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("tap", function (args: gestures.GestureEventData) { console.log("Tap"); }); // ``` // } export var test_DummyTestForSnippetOnly7 = function () { // // ### Stop observing // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.tap, function (args: gestures.GestureEventData) { console.log("Tap"); }); observer.disconnect(); // ``` // } export var test_DummyTestForSnippetOnly8 = function () { // // ### Multiple gestures // ``` JavaScript var label = new labelModule.Label(); var observer = label.on(gestures.GestureTypes.tap | gestures.GestureTypes.doubleTap | gestures.GestureTypes.longPress, function (args: gestures.GestureEventData) { console.log("Event: " + args.eventName); }); // ``` // } export var test_DummyTestForSnippetOnly88 = function () { // // ### Multiple gestures as comma separated string // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("tap, doubleTap, longPress", function (args: gestures.GestureEventData) { console.log("Event: " + args.eventName); }); // ``` // } export var test_DummyTestForSnippetOnly9 = function () { // // ### Events combined with gestures as comma separated string // ``` JavaScript var label = new labelModule.Label(); var observer = label.on("loaded, tap, longPress", function (args: gestures.GestureEventData) { console.log("Event: " + args.eventName); }); // ``` // }