Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
besom
Advanced tools
Readme
A Javascript Library For Multi-Touch and Mouse Event Gestures (tap, longtap, doubletap, pinch, slide, rotate)
npm install besom --save
or yarn add besom
or cdn https://cdn.jsdelivr.net/npm/besom/dist/besom.min.js
var Besom = require('besom'), g = Besom.create(document.getElementById('demo'));
g.enable('longtap', 'slide', 'pinch');
//bind Event
g.on('tap', function(){ console.log('tap') }); //tap event is enabled by default
g.on('longtap', function(){ console.log('longtap') });
g.on('slide', function(e){ this.translate(e.translate) });
g.on('slideEnd', function(){ console.log('slideEnd') });
g.on('start', function(e){
if(e.count == 2) this.setPointAsOrigin(e.center)
})
g.on('pinch', function(e){ this.scale(e.scale) });
g.on('pinchEnd', function(){ console.log('pinchEnd') });
See Demos Click Here
tap
(enabled default)longtap
doubletap
slide
pinch
rotate
tap
longtap
doubletap
start
slide
slideEnd
pinch
pinchEnd
rotate
rotateEnd
Besom.create(element)
enable(gesture), disable(gesture) - enable/disable gestures
on(event, fn) - add gesture event function
the parameter of the event callback function - fn(currentGestureEventObject, startGestureEventObject, currentTransformableElement)
currentGestureEventObject
and startGestureEventObject
is the formatted event object with caculated datas of the gesturescurrentTransformableElement
or this
in the callback function fn
- refers to the transformable element. More details see bellowdelegate(className, event, fn) - delegate the gesture of the child element which has the className className
destroy() - destroy the gesture manager and events
Besom.element(element)
FAQs
A Javascript Library For Multi-Touch or Mouse Event Gestures (tap, longtap, doubletap, pinch, slide, rotate)
The npm package besom receives a total of 7 weekly downloads. As such, besom popularity was classified as not popular.
We found that besom 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.