|
- {"ast":null,"code":"export function update(scrollbar) {\n var newSize = scrollbar.getSize();\n var limit = {\n x: Math.max(newSize.content.width - newSize.container.width, 0),\n y: Math.max(newSize.content.height - newSize.container.height, 0)\n }; // metrics\n\n var containerBounding = scrollbar.containerEl.getBoundingClientRect();\n var bounding = {\n top: Math.max(containerBounding.top, 0),\n right: Math.min(containerBounding.right, window.innerWidth),\n bottom: Math.min(containerBounding.bottom, window.innerHeight),\n left: Math.max(containerBounding.left, 0)\n }; // assign props\n\n scrollbar.size = newSize;\n scrollbar.limit = limit;\n scrollbar.bounding = bounding; // update tracks\n\n scrollbar.track.update(); // re-positioning\n\n scrollbar.setPosition();\n}","map":null,"metadata":{},"sourceType":"module"}
|