https://github.com/itsecholot/cordova-plugin-stylus
Pen drawing events in your cordova app because who wants a stylus?
https://github.com/itsecholot/cordova-plugin-stylus
cordova cordova-plugin pen stylus
Last synced: 4 months ago
JSON representation
Pen drawing events in your cordova app because who wants a stylus?
- Host: GitHub
- URL: https://github.com/itsecholot/cordova-plugin-stylus
- Owner: ItsEcholot
- License: apache-2.0
- Created: 2019-12-19T20:03:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-30T21:35:43.000Z (over 6 years ago)
- Last Synced: 2025-08-16T23:17:16.071Z (11 months ago)
- Topics: cordova, cordova-plugin, pen, stylus
- Language: Java
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```JavaScript
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.