op-view-progress
Element's position on the screen / view. Progress is calculated in relation between node's top position, height and window's height. The value is:
-1
and less for items under viewport-1 ... 0 ... 1
in the viewport, where0
is for elements in the middle1
and more for items above viewport
Install
npm install op-view-progress
yarn add op-view-progress
Usage
;
Create instance:
const progress = domNode;
Update / tick:
progress;
Get value:
progressvalue;