当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Gesture.on方法代码示例

本文整理汇总了TypeScript中ionic-angular/gestures/gesture.Gesture.on方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Gesture.on方法的具体用法?TypeScript Gesture.on怎么用?TypeScript Gesture.on使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ionic-angular/gestures/gesture.Gesture的用法示例。


在下文中一共展示了Gesture.on方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: ngOnInit

 ngOnInit() {
   this.swipeGesture = new Gesture(this.el, {
     recognizers: [
       [Hammer.Swipe, {direction: Hammer.DIRECTION_VERTICAL}]
     ]
   });
   this.swipeGesture.listen()
   this.swipeGesture.on('swipeup', e => {
     this.actionUp()
   })
   this.swipeGesture.on('swipedown', e => {
     this.actionDown()
   })
 }
开发者ID:pavle93,项目名称:pavle93.github.io,代码行数:14,代码来源:swipe-vertical.ts

示例2: ngOnInit

 ngOnInit() {
   this.pressGesture = new Gesture(this.el);
   this.pressGesture.listen();
   this.pressGesture.on('press', e => {
     let actionSheet = ActionSheet.create({
       title: 'Modify your album',
       buttons: [
         {
           text: 'Delete',
           role: 'destructive',
           icon: 'trash',
           handler: () => {
             // console.log(this.el.textContent.trim());
             console.log(this.obj);
             console.log(Games.find({ _id: this.obj }).fetch());
             // console.log(Lists.find({ _id: this.obj }).length>0);
             if (Games.find({ _id: this.obj }).fetch().length > 0)
               console.log(Games.remove({ _id: this.obj }));
             // else if (ShoppingLists.find({ _id: this.obj }).fetch().length > 0)
             //   console.log(ShoppingLists.remove({ _id: this.obj }));
           }
         }, {
           text: 'Cancel',
           role: 'cancel',
           cssClass: 'redd',
           handler: () => {
             console.log('Cancel clicked');
           }
         }
       ],
     });
     this.nav.present(actionSheet);
   })
 }
开发者ID:ShaharLahav,项目名称:Betting-game-admin,代码行数:34,代码来源:long-press.ts

示例3: ngOnInit

  ngOnInit() {
    this.swipeGesture = new Gesture(this.el, {
      recognizers: [
        [Hammer.Swipe, {direction: Hammer.DIRECTION_VERTICAL}]
      ]
    });
    this.swipeGesture.listen();
    this.swipeGesture.on('swipeup', e => {
      console.log('swipeup!!');
      this.events.publish('event:swipe','up');

    })
    this.swipeGesture.on('swipedown', e => {
      console.log('swipedown!!');
      this.events.publish('event:swipe','down');

    })

  }
开发者ID:qwb0920,项目名称:ionic2-2048,代码行数:19,代码来源:swipe-vertical.ts


注:本文中的ionic-angular/gestures/gesture.Gesture.on方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。