lesca-sensor-orientation-change
v1.2.3
Published
get angle when orientation change on mobile device.
Downloads
39
Maintainers
Readme
Why use it?
a listener of orientation change for mobile or tablet.
Live Demo
Installation
npm install lesca-sensor-orientation-change --save
Usage
import OrientationChange from 'lesca-sensor-orientation-change';
OrientationChange.addEventListener((e) => {
console.log(e); // landscape or portrait
});
Development
Methods
| method | description | default | | :------------------------------------------------- | :------------------------------: | ------: | | .addEventListener(eventHandler:function) | get angle when orentation change | | | .destroy() | remove event | |
Prop
Features
- maintain if necessary