format
This commit is contained in:
parent
2ec1e09105
commit
4bf7357c30
|
@ -382,12 +382,16 @@ const onContextmenu = (ev: MouseEvent) => {
|
||||||
|
|
||||||
const attachSticky = (el: any) => {
|
const attachSticky = (el: any) => {
|
||||||
let lastScrollTop = 0;
|
let lastScrollTop = 0;
|
||||||
addEventListener("scroll", (ev) => {
|
addEventListener(
|
||||||
requestAnimationFrame(() => {
|
"scroll",
|
||||||
widgetsEl.scrollTop += window.scrollY - lastScrollTop;
|
(ev) => {
|
||||||
lastScrollTop = window.scrollY <= 0 ? 0 : window.scrollY;
|
requestAnimationFrame(() => {
|
||||||
})
|
widgetsEl.scrollTop += window.scrollY - lastScrollTop;
|
||||||
}, { passive: true });
|
lastScrollTop = window.scrollY <= 0 ? 0 : window.scrollY;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
{ passive: true }
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
function top() {
|
function top() {
|
||||||
|
|
Loading…
Reference in New Issue