cordova-plugin-stylus

0.2.1 • Public • Published

Stylus

Down, up & move events with coordinates and pressure data from pen / stylus for your cordova project.

Currently only supports Android but looking to support more platforms in the future.

Usage

if (window.StylusPlugin) {
  StylusPlugin.registerListeners();
}
 
document.addEventListener('stylusplugin-up', event => {
  console.dir(event);
});
document.addEventListener('stylusplugin-down', event => {
  console.dir(event);
});
document.addEventListener('stylusplugin-move', event => {
  console.dir(event);
});

The event object is trying to replicate a TouchEvent to allow for drop in replacement / adoption. For more information visit the official TouchEvent documentation in conjunction with the Stylus.java source file.

Package Sidebar

Install

npm i cordova-plugin-stylus

Weekly Downloads

1

Version

0.2.1

License

Apache 2.0

Unpacked Size

18.9 kB

Total Files

6

Last publish

Collaborators

  • echolot