Releases: scriptex/touchsweep
Releases · scriptex/touchsweep
Use passive event listeners for better web vitals
Add move detection
New:
- This release adds support for
swipemovedetection. - The coordinates of all swipe actions now are available in the
event.detail. The coordinates contain details about start, move and end coordinates for both axes - x and y.
Improvements:
- New and improved typings.
- The
eventDatainstance property is now public and can be accessed and modified.
const instance = new TouchSweep(document.getElementById('touchsweep'), { data: 2 }, 40)
const eventData = instance.eventData; // { data: 2 }
// Update the event data at any time
instance.eventData = { data: 2, value: 3 };Use Rollup to build
This release switches to Rollup as a build tool instead of the built-in TypeScript compiler.
The reason is the way TypeScript produces UMD bundles.
This release fixes #127
Migrate to TypeScript
BREAKING: It is no longer possible to use the TouchSweep module without a module bundler or via unpkg.com.
This release:
- improves the mouse/touch event type detection.
- migrates the codebase to TypeScript adding full TS support.
- installs and configures ESLint
- includes a new demo, available here
Mouse support
This release adds support for mouse events.
TypeScript definitions
This release adds TypeScript declarations file which enables TypeScript support.
Fix direction checks and update demo
This release fixes a minor issue when determing the direction of the swipe (thanks to @anonimusprogramus).
The demo has been updated to show how the event data can be updated.
New Year!
Optimized distribution
This release removes Webpack as a module bundler and uses Babel extensively.
Babel is now officially updated to v.7
First stable
0.1.0 Update README