worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
20
node_modules/dom-helpers/esm/getScrollAccessor.js
generated
vendored
Normal file
20
node_modules/dom-helpers/esm/getScrollAccessor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import isWindow from './isWindow';
|
||||
export default function getscrollAccessor(offset) {
|
||||
var prop = offset === 'pageXOffset' ? 'scrollLeft' : 'scrollTop';
|
||||
|
||||
function scrollAccessor(node, val) {
|
||||
var win = isWindow(node);
|
||||
|
||||
if (val === undefined) {
|
||||
return win ? win[offset] : node[prop];
|
||||
}
|
||||
|
||||
if (win) {
|
||||
win.scrollTo(win[offset], val);
|
||||
} else {
|
||||
node[prop] = val;
|
||||
}
|
||||
}
|
||||
|
||||
return scrollAccessor;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue