Package Exports
- cursor-direction
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cursor-direction) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cursor-direction
cursor-direction on a DOM element.
Install
$ npm install --save cursor-direction
Demo
Usage
const cursorDirection = require('cursor-direction');
// Example
element.addEventListener('mouseover', function (event) {
cursorDirection(event, this); //=> 'TOP | RIGHT | BOTTOM | LEFT'
}, false);
API
cursorDirection(event, domElement)
event
Type: Event
MouseEvent
domElement
Type: DOMElement
Element of interest.
License
MIT © Hemanth.HM