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


TypeScript gesture.Gesture类代码示例

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


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

示例1: 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

示例2: 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

示例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

示例4: ngOnDestroy

 ngOnDestroy() {
   this.pressGesture.destroy();
 }
开发者ID:ShaharLahav,项目名称:Betting-game-admin,代码行数:3,代码来源:long-press.ts

示例5: ngOnDestroy

 ngOnDestroy() {
   this.swipeGesture.destroy()
 }
开发者ID:pavle93,项目名称:pavle93.github.io,代码行数:3,代码来源:swipe-vertical.ts


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