mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-17 04:28:07 +01:00
This commit is contained in:
parent
c70e3f46ec
commit
9f0eaa6a0b
3 changed files with 9 additions and 6 deletions
|
|
@ -30,6 +30,7 @@ const dragoverScroll: {
|
|||
space?: number // -1 向上;1 向下
|
||||
lastTime?: number
|
||||
} = {};
|
||||
|
||||
export const stopScrollAnimation = () => {
|
||||
if (dragoverScroll.animationId) {
|
||||
cancelAnimationFrame(dragoverScroll.animationId);
|
||||
|
|
@ -39,6 +40,7 @@ export const stopScrollAnimation = () => {
|
|||
dragoverScroll.lastTime = null;
|
||||
}
|
||||
};
|
||||
|
||||
const scrollAnimation = (timestamp: number) => {
|
||||
if (!dragoverScroll.lastTime) {
|
||||
dragoverScroll.lastTime = timestamp - 8;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue