subscribe-ui-event
Advanced tools
Comparing version 0.2.3 to 0.2.4
{ | ||
"name": "subscribe-ui-event", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "A single, throttle built-in solution to subscribe to browser UI Events.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -60,7 +60,11 @@ # subscribe-ui-event | ||
type: <String>, // could be 'scroll', 'resize' ... | ||
// you need to pass options.enableScrollTop = true to subscribe to get the following data | ||
// you need to pass options.enableScrollInfo = true to subscribe to get the following data | ||
scroll: { | ||
top: <Number>, // The scroll position, i.g., document.body.scrollTop | ||
prevTop: <Number>, // The previous scroll position | ||
delta: <Number> // The delta of scroll position, it is helpful for scroll direction | ||
}, | ||
// you need to pass options.enableResizeInfo = true to subscribe to get the following data | ||
resize: { | ||
width: <Number>, // The client width | ||
height: <Number> // The client height | ||
} | ||
@@ -67,0 +71,0 @@ } |
31378
108