0.1.1 • Published 3 years ago

airxtouch-toolkit-proxy v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

AIRxTOUCH™ Advanced developer guide for web applications

⚠ This library is only usefull if you own an AIRxTOUCH™ device ⚠

Prerequisite

Features

  • Use the zoom (simulation of ctrl + mousewheel)
  • Define dynamically your application layout
  • Enable hover interaction

Install the AIRxTOUCH Proxy browser extension

In order to communicate with the driver with a web app, you need to install our browser extension

Activate the extension on your application

  • For debug purposes we recommand to pin the extension icon on your browser
  • While on your application, authorize the extension to interact with your page by clicking on the extension icon (red feather)
  • Click Accept on the popup

popup

Keep in mind that this only authorize the current url on your device. You'll need to repeat this action on every AIRxTOUCH™ device for every application.

Initialize the connection with the driver in your code

To interact with the driver, add the following div to your code

<div
  id="airxtouch-proxy"
  style="display: none"
>
</div>
  • The id must be airxtouch-proxy
  • The div must be available when the DOM is loaded

If you did it properly, you will see a badge on the extension icon with the "ON" label. You will also see the following line in your console : AIRxTOUCH proxy configuration detected

icon If the background color of the badge is green, it means that the communication with the driver is successfull

icon If the background color of the badge is red, it means the communication with the driver is not established.

If you are not currently running your application (eg development environnement) on a AIRxTOUCH™ device you can ignore this.

If you are running you are running your application on a AIRxTOUCH™ device, make sure the driver is launched (icon in system tray) icon

Interact with the driver in your code

Install our library

npm install airxtouch-toolkit-proxy --save

This library contain all the enums and objects you'll need to interact with the driver

import {
  AIRxTouchInteractionMode,
  AIRxTouchDefaultLayoutSetting,
  GetElementBounds
} from "airxtouch-proxy-helper";

You can interact with the driver by adding and editing attributes on the airxtouch-proxy div that you previously added

AttributeDescriptionRequired
data-appidYour uniq application id (can be the application name)
data-fulllayoutAIRxTouchDefaultLayoutSetting (enum from package)
data-interactionmodeAIRxTouchInteractionMode (enum from package)
data-hoverinteractionBoolean. Default to false
data-layoutArray of AIRxTouchLayoutSetting, can be generated using GetElementBounds. used when you need differents layout setting on the same page. (More details on the examples)

Examples

Simple example : Init config and toggle simple options

data-layout example : How to use data-layout & GetElementBounds

0.1.1

3 years ago

0.1.0

3 years ago