Жесты (Gestures)

Теги: gestures

Single-touch gestures:

GestureEvents
Tap

tap, tapcancel
DoubleTap singletap, doubletap
LongPress longpress
Drag dragstart, drag, dragend, dragcancel

Swipe

swipe, swipestart, swipecancel

EdgeSwipe

edgeswipestart, edgeswipe, edgeswipecancel

Multi-touch gestures:

GestureEvents

Pinch 

pinchstart, pinch, pinchend, pinchcancel 

Rotate

rotatestart, rotate, rotateend, rotatecancel

Пример из демки:

/**
 * Presents a large touch zone and reports all of the touch events fired when the user interacts with it
 */
Ext.define('Kitchensink.view.TouchEvents', {
  extend: 'Ext.Container',
  xtype: 'touchevents',
  
  requires: [
    'Kitchensink.view.touchevent.Info',
    'Kitchensink.view.touchevent.Logger',
    'Kitchensink.view.touchevent.Pad'
  ],

  initialize: function() {
    this.callParent(arguments);

    this.getEventDispatcher().addListener('element', '#touchpad', '*', this.onTouchPadEvent, this);
  },

  onTouchPadEvent: function(e, target, options, eventController) {
    var eventName = eventController.info.eventName;

    if (!eventName.match("mouse") && eventName !== 'click') {
      this.down('toucheventlogger').addLog(eventName);
    }
  }
});

Ссылки:

http://dev.sencha.com/deploy/touch/examples/production/kitchensink/#demo/touchevents

https://www.sencha.com/blog/delegated-events-and-gestures-in-ext-js-5/

https://docs.sencha.com/extjs/6.0/core_concepts/tablet_support.html

Нет комментариев

Добавить комментарий