You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
653 B
34 lines
653 B
const GAP = 4;
|
|
const BAR_MAP = {
|
|
vertical: {
|
|
offset: "offsetHeight",
|
|
scroll: "scrollTop",
|
|
scrollSize: "scrollHeight",
|
|
size: "height",
|
|
key: "vertical",
|
|
axis: "Y",
|
|
client: "clientY",
|
|
direction: "top"
|
|
},
|
|
horizontal: {
|
|
offset: "offsetWidth",
|
|
scroll: "scrollLeft",
|
|
scrollSize: "scrollWidth",
|
|
size: "width",
|
|
key: "horizontal",
|
|
axis: "X",
|
|
client: "clientX",
|
|
direction: "left"
|
|
}
|
|
};
|
|
const renderThumbStyle = ({
|
|
move,
|
|
size,
|
|
bar
|
|
}) => ({
|
|
[bar.size]: size,
|
|
transform: `translate${bar.axis}(${move}%)`
|
|
});
|
|
|
|
export { BAR_MAP, GAP, renderThumbStyle };
|
|
//# sourceMappingURL=util.mjs.map
|