StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
5 years ago | |
|---|---|---|
| .. | ||
| .npmignore | 5 years ago | |
| LICENSE.md | 5 years ago | |
| README.md | 5 years ago | |
| index.js | 5 years ago | |
| package.json | 5 years ago | |
README.md
mouse-event-offset
Computes the [ offsetX, offsetY ] from a mouse or touch event, relative to the top left of the target element.
var offset = require('mouse-event-offset')
window.addEventListener('touchstart', function (ev) {
var target = ev.currentTarget
var touch = ev.changedTouches[0]
var pos = offset(touch, target)
//=> [ 128, 52 ]
})
Usage
position = offset(event, [target], [out])
Pass a MouseEvent or TouchEvent as event.
Optionally, you can specify a target element which the touch event should be relative to. Defaults to event.currentTarget, falling back to event.srcElement for older IE.
You can also specifiy out to store the position in that array, and avoid creating a new one.
Changelog
3.xnew version; simpler API, less assumptions, avoids GC thrashing2.xusesev.currentTargetinstead ofev.target1.xsimple implementation usingev.target || ev.srcElement
License
MIT, see LICENSE.md for details.