@sourcegraph/event-positions
v1.0.4
Published
Finds the positons of mouse events in dom elements.
Downloads
17
Keywords
Readme
Event Positions
This is a small library used to determining the the positions that events happened at in code views.
Installation
npm install @sourcegraph/event-positions
Usage
It is currently exposed as an RxJs Operator
import { findPositionsFromEvents } from 'event-positions'
observableOfDomElements
.pipe(
findPositionsFromEvents({
...props,
})
)
.subscribe(positionEvent => console.log(positionEvent)) // { line: ..., character: ..., token: ... }