當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。