Logo Logo en
  • iRidi Pro
    Основные компоненты
    • Приложение i3 Pro
    • iRidi Pro Server
    • iRidi Studio
    • iRidium studio v. 1.3.8 (устаревшая версия)
    Java Script в iRidi
    • Руководство
    • Справочник
    • Примеры
    • JS драйвера
    другие
    • Личный Кабинет
    • iRidium Cloud
    • iRidium Transfer
    • Push-уведомления
    • Лучшая практика
    Лицензирование
    • Лицензирование и передача проекта
    • Оффлайн-лицензирование
    • Активация iRidi Pro Server
  • Продукты
    i3 lite
    • Приложение i3 lite
    • Регистрация и лицензирование
    • Сервер
    • Модули
    KNX Home Server
    • Приложение i3 KNX
    • KNX Home Server
    BUS77 HOME SERVER
    • Приложения Bus77 Home и Bus77 Lite
    • Bus77 Home Server
    Решения
    • BYOD - решение для гостиниц
    • Портал жителя - решение для МКД
    iRidi SCADA
    • iRidi SCADA
  • Bus77
    НАСТРОЙКА BUS77
    • Основы Bus77
    • Приложения Bus77 Home и Bus77 Lite
    • Работа с драйвером Bus77 в iRidi Studio
    • Настройка шины Bus77 в iRidi Studio
    ПРОТОКОЛ BUS77
    • Характеристики CAN (Bus77)
    • Описание протокола
    • Исходники на GitHub
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
  • Поддерживаемое оборудование
    Драйверы
    • Список драйверов
    • ProAV драйвера
    • AV & Custom Systems
    • JS драйвера
    • Сторонние драйвера и фриланс
    Протоколы и интерфейсы
    • Голосовое управление
    • 1-Wire
    • BACnet IP
    • Bus77
    • KNX
    • KNX IP BAOS
    • Weinzierl kBerry
    • Microsoft Exchange
    • Modbus
    • MQTT
    • NFC
    • ODBC
    • Onvif
    • SIP
    • SNMP
    • Wake On Lan
    • Z-Wave
    • ZigBee
    Производители
    • AMX
    • AVCiT
    • Beckhoff ADS
    • Biamp Tesira
    • Bluesound
    • Casambi
    • BSS Harman
    • Clipsal
    • ControlArt 7Port
    • Crestron
    • DigiBird
    • Domintell
    • Duotecno
    • EIDE
    • EPSNET
    • Global Cache
    • HDL Buspro
    • Helvar
    • IEAST
    • INELS BUS
    • INELS Wireless
    • Intesis
    • Kleger
    • Kramer VIA
    • Kramer 3000
    • Larnitech
    • Legrand Netatmo
    • LG TV
    • Lutron
    • Lutron Homeworks QS
    • MyHome
    • Nest
    • Novastar
    • Panasоnic PTZ
    • Philips Dynalite
    • PJLink
    • Satel
    • SamsungTV
    • Sonos
    • Somfy
    • SpinetiX
    • Televic Conference
    • TIS
    • Tion
    • URRI
    • Velbus
    • Velocio
    • Vinteo
    • WyreStorm
    • WiiM
    • Xicato
    • Yamaha
    • ZONT
    • Z-Wave.me
    Протестированное оборудование
    • Панель HDL S57
    • Панель HDL S10
    • SIP-домофон
    • Akuvox
    • Arlight
    • Divus
    • QBic TD-1050 PRO
    • QBic TD-1060 Slim
    • QBic TD-1070
    • Sigur
    • Uni-Ubi
    • Velocio
  • Оборудование iRidi

    Серверы
    • HS Сервер
    • ProAV Control Processor Basic
    • ProAV Control Processor Advanced
    • Спецификация контроллеров UMC
    • Настройка контроллера UMC C2
    • Настройка контроллера UMC C3
    • Настройка контроллера HDL IntelliCenter 2 (UMC C4)
    Модули расширения
    • I-PX-RS1
    • I-PX-RS4
    • I-PX-IR3
    KNX
    • KNX Home Server
    • KNX IP Interface
    Панели управления
    • iRidium Panel 7
    • Touch Panel P3
    • Touch Panel P6
    • Touch Panel P8
    • Touch Panel P10
    • Tabletop Touch Panel 10
    • AV Remote Control
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
    • Differences
iRidium mobile web-site
Содержание
    Инструменты‌
    • Сведения о странице
    • Постоянная ссылка
    • Версия для печати
    • Спецстраницы
    • Связанные правки
    • Ссылки сюда
    Login / Create Account
    Материал из for iRidium developers
    Перейти к: навигация, поиск
    Эта страница является переводом страницы Gestures API. Перевод выполнен на 100%.

    Other languages:
    English • ‎русский
  • JS Handbook
  • Gestures
  • Содержание

    • 1 API iRidium. Gestures
    • 2 Methods
      • 2.1 IR.AddRecognizer
      • 2.2 IR.RemoveRecognizer
    • 3 Events
      • 3.1 IR.EVENT_GESTURE_BEGIN

    API iRidium. Gestures

    Gestures enable interaction with items or activation of particular functions in iRidium projects for panels with sensor screens. Gestures will not work on devices controlled with the help of the mouse and keyboard!

    Methods

    IR.AddRecognizer

    This function is used for activating gestures.

    Syntax

    IR.AddRecognizer(gesture_type);

    input value description
    gesture_type IR.GESTURE_SWIPE_LEFT type: Object
    the gesture type:
    • IR.GESTURE_SWIPE_LEFT - to the left;
    • IR.GESTURE_SWIPE_RIGHT - to the right;
    • IR.GESTURE_SWIPE_UP - up;
    • IR.GESTURE_SWIPE_DOWN - down;
    • IR.GESTURE_PINCH_IN - to pinch in;
    • IR.GESTURE_PINCH_OUT - to pinch out;
    • IR.GESTURE_LONG_PRESS - a long pressing;
    • IR.GESTURE_DOUBLE_TAP - a double tapping;
    output

    -


    Sample

    IR.AddListener(IR.EVENT_START,0,function()
    // The event which is activated in the start of application work 
    {
        IR.AddRecognizer(IR.GESTURE_SWIPE_LEFT);  // (1) The SWIPE_LEFT gesture is activated 
        IR.AddRecognizer(IR.GESTURE_SWIPE_RIGHT); // (2) The SWIPE_RIGHT gesture is activated
        IR.AddRecognizer(IR.GESTURE_SWIPE_UP);    // (3) The SWIPE_UP gesture is activated
        IR.AddRecognizer(IR.GESTURE_SWIPE_DOWN);  // (4) The SWIPE_DOWN gesture is activated
        IR.AddRecognizer(IR.GESTURE_PINCH_IN);    // (5) The PINCH_IN gesture is activated
        IR.AddRecognizer(IR.GESTURE_PINCH_OUT);   // (6) The PINCH_OUT gesture is activated
        IR.AddRecognizer(IR.GESTURE_LONG_PRESS);  // (7) The LONG_PRESS gesture is activated
        IR.AddRecognizer(IR.GESTURE_DOUBLE_TAP);  // (8) The DOUBLE_TAP gesture is activated
    });





    IR.RemoveRecognizer

    This function is used for deactivating gestures

    Syntax

    IR.RemoveRecognizer(gesture_type);

    input value description
    gesture_type IR.GESTURE_SWIPE_LEFT type: Object
    the gesture type:
    • IR.GESTURE_SWIPE_LEFT - to the left;
    • IR.GESTURE_SWIPE_RIGHT - to the right;
    • IR.GESTURE_SWIPE_UP - up;
    • IR.GESTURE_SWIPE_DOWN - down;
    • IR.GESTURE_PINCH_IN - to pinch in;
    • IR.GESTURE_PINCH_OUT - to pinch out;
    • IR.GESTURE_LONG_PRESS - a long pressing;
    • IR.GESTURE_DOUBLE_TAP - a double tapping;
    output

    -


    Sample

    IR.AddListener(IR.EVENT_EXIT,0,function()  // The event which is activated when exiting the application 
    {
        IR.RemoveRecognizer(IR.GESTURE_SWIPE_LEFT);  // (1) The SWIPE_LEFT gesture is deactivated 
        IR.RemoveRecognizer(IR.GESTURE_SWIPE_RIGHT); // (2) The SWIPE_RIGHT gesture is deactivated 
        IR.RemoveRecognizer(IR.GESTURE_SWIPE_UP);    // (3) The SWIPE_UP gesture is deactivated 
        IR.RemoveRecognizer(IR.GESTURE_SWIPE_DOWN);  // (4) The SWIPE_DOWN gesture is deactivated 
        IR.RemoveRecognizer(IR.GESTURE_PINCH_IN);    // (5) The PINCH_IN gesture is deactivated 
        IR.RemoveRecognizer(IR.GESTURE_PINCH_OUT);   // (6) The PINCH_OUT gesture is deactivated 
        IR.RemoveRecognizer(IR.GESTURE_LONG_PRESS);  // (7) The LONG_PRESS gesture is deactivated 
        IR.RemoveRecognizer(IR.GESTURE_DOUBLE_TAP);  // (8) The DOUBLE_TAP gesture is deactivated 
    });





    Events

    IR.EVENT_GESTURE_BEGIN

    The event is activated when starting the gesture

    Syntax

    IR.AddListener(R.EVENT_GESTURE_BEGIN, page, function, [pointer]);

    input value description
    page IR.GetItem("Page 1") type: object
    the link to the interface object
    function function() {} type: function
    the unnamed function or referring to the function
    pointer - type: object
    the poiter to the object which serves the function (optional)
    output
    gesture - type: variable
    the type name of the gesture which started
    x - type: variable
    the X coordinate of the gesture start
    y - type: variable
    the Y coordinate of the gesture start


    Sample

    var button; 
    IR.AddListener(IR.EVENT_START, 0, function()
    // The event which is activated in the start of application work 
    {
        // Create the button for switching between pages 
        var button = IR.CreateItem(IR.ITEM_BUTTON, "text", 10, 10);
        button.Text = "";
        // Activation of gestures 
        IR.AddRecognizer(IR.GESTURE_SWIPE_LEFT);  // The SWIPE_LEFT gesture is activated
        IR.AddRecognizer(IR.GESTURE_SWIPE_RIGHT); // The SWIPE_RIGHT gesture is activated
        IR.AddRecognizer(IR.GESTURE_SWIPE_UP);    // The SWIPE_UP gesture is activated
        IR.AddRecognizer(IR.GESTURE_SWIPE_DOWN);  // The SWIPE_DOWN gesture is activated
    // Connect the listener, send the current page and the function with parameters 
        IR.AddListener(IR.EVENT_GESTURE_BEGIN, IR.CurrentPage, function(gesture, x, y)
        {
            // The selection construction 
            switch(gesture)
            {
            case IR.GESTURE_SWIPE_LEFT: // 1
                button.Text = "Left";   // If the SWIPE_LEFT gesture starts, then there will be the "Left" sign
                break;
            case IR.GESTURE_SWIPE_RIGHT: // 2
                button.Text = "Right";  // If the SWIPE_RIGHT gesture starts, then there will be the "Right" sign
                break;
            case IR.GESTURE_SWIPE_UP: // 3
                button.Text = "Up";     // If the SWIPE_UP gesture starts, then there will be the "Up" sign
                break;
            case IR.GESTURE_SWIPE_DOWN: // 4
                button.Text = "Down";   // If the SWIPE_DOWN gesture starts, then there will be the "Down" sign
                break;
            }
        });
    });




    Источник — «https://dev.iridi.com/index.php?title=Gestures_API/en&oldid=44036»
    Категория:
    • Инструкции
    About us
    Company
    Team
    History
    Philosophy
    Rewards
    Partnership
    Our partner
    Partnership Programs
    Apply for partnership
    products
    iRidium pro
    iRidium lite
    iRidium gate
    iRidium server
    Loads
    iRidium pro
    iRidium lite
    Other version
    Marketing materials
    Support
    On-line courses/Video
    Recommended equipment
    Other version
    iRidium pro
    Documentation
    FAQ
    Forum
    iRidium lite
    Documentation
    Forum
    Projects
    Standart projects
    Smart buildings
    Smart house
    Special solution
    Find a dealer
    News
    Youtube
    Twitter
    VK
    Logo
    contact@iridi.com
    +7 (499) 322-73-29

    Privacy policy