![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A (hopefully it stays) small web gesture library.
npm install jestures -S
yarn jestures
on('swipe')((swipeEvent) => { console.log('swiped ', swipeEvent.detail.direction) })
eventName -> callback -> target -> off
The on
function is the only exposed function. See Gestures for the gesture events that can be listened for.
The tap
event is what is wanted most of the time you want to react to a user 'click' on an element. It bypasses the usual 300 millisecond delay and makes your app feel more responsive.
const offTap = on('tap')((tapEvent) => {
console.log(`just ${swipeEvent.type} it in. `)
offTap()
})
The double-tap
event is fired when the user taps twice in succession within 300ms. It should be noted that a double-tap
event will be preceded by two tap
events.
const offDoubleTap = on('double-tap')((tapEvent) => {
console.log(`just ${swipeEvent.type} it in. `)
offDoubleTap()
})
There may be occasions where a single tap needs to be distinguished from a double-tap. Usually, this only happen when a single tap and a double-tap each have distinctly different meanings and different actions need to be taken for each of them respectively. In those case, using the tap
event would be less helpful. Instead, use the single-tap
which uses the default experience of a 300ms delay before firing the event to ensure the tap in not just the first tap of a double tap gesture.
const offSingleTap = on('single-tap')((singleTapEvent) => {
console.log(`This is ${singleTapEvent.type}`)
offSingleTap()
})
The swipe
event fires whenever the user moves a touch more than 50px in either ordinal direction. The event includes a detail
object with a direction
property that has a value of either up
, down
, left
, or right
depending on which direction was the greatest.
const offSwipe = on('swipe')((swipeEvent) => {
console.log('swiped ', swipeEvent.detail.direction)
offSwipe()
})
The pinch
event fires when a touchmove
event happen with exactly two touch points originating from the same target element. The pinch
event also has a detail
object with a distance
property that gives the distance between the two touch points. This is useful to map the scale of an element to the motion and growth of the gesture, or to determine whether the gesture is pinching - the distance between the touch points is diminishing - or spreading - the distance between touch points is growing.
FAQs
A (hopefully it stays) small web gesture library.
The npm package jestures receives a total of 0 weekly downloads. As such, jestures popularity was classified as not popular.
We found that jestures demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.