@composi/gestures
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@composi/gestures", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Cross-platform gesture library for desktop and mobile.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -28,6 +28,6 @@ # @composi/gestures | ||
1. eventStart | ||
2. eventEnd | ||
3. eventMove | ||
4. eventCancel | ||
1. eventstart | ||
2. eventend | ||
3. eventmove | ||
4. eventcancel | ||
@@ -37,5 +37,5 @@ On desktop these resolve to `mousedown`, `mouseup` (click), `mousemove` and `mouseout`. On a device with support for pointer events, these become: `pointerdown`, `pointerup`, `pointermove` and `pointercancel`. On a device that supports touch events these become: `touchstart`, `touchend`, `touchmove` and `touchcancel`. You can use these event aliases just like you would any other events, with the assurance that they will work the same everywhere: | ||
```javascript | ||
import { eventStart, eventEnd, eventMove, eventCancel } from '@composi/gestures' | ||
import { eventstart, eventend, eventmove, eventcancel } from '@composi/gestures' | ||
document.querySelector('button').addEventListener(eventEnd, (e) => { | ||
document.querySelector('button').addEventListener(eventend, (e) => { | ||
e.target.classList.toggle('selected') | ||
@@ -85,3 +85,3 @@ }) | ||
return ( | ||
<button onTap={() => announceTap()}>Tap</button> | ||
<button ontap={() => announceTap()}>Tap</button> | ||
) | ||
@@ -92,3 +92,3 @@ }, | ||
return ( | ||
<button onSwipe={() => announceSwipe()}>Swipe</button> | ||
<button onswipe={() => announceSwipe()}>Swipe</button> | ||
) | ||
@@ -153,3 +153,3 @@ } | ||
return ( | ||
<button ref={this.button} onSwipe={e => this.handleSwipe(e)}>Swipe Me!</button> | ||
<button ref={this.button} onswipe={e => this.handleSwipe(e)}>Swipe Me!</button> | ||
) | ||
@@ -156,0 +156,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package