-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(canvas): 添加键盘快捷键和橡皮草稿可视化 - 绑定Ctrl+Z和Ctrl+Shift+Z键盘快捷键分别用于撤销和重做操作。 - 在Canvas组件中可视化自己的草稿以及他人的草稿。 - 重构CursorPresence组件,区分用户光标和草稿视觉化。 - 通过useDisableScrollBounce钩子禁用滚动反弹效果。 - 修复SelectionBox组件中的注释,并优化代码风格。 ```
- Loading branch information
1 parent
e6fa740
commit c722619
Showing
6 changed files
with
113 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { useEffect } from "react"; | ||
|
||
export const useDisableScrollBounce = () => { | ||
useEffect(() => { | ||
document.body.classList.add( | ||
"overscroll-none", | ||
"overflow-hidden", | ||
// "disable-scroll-bounce" | ||
); | ||
|
||
return () => { | ||
document.body.classList.remove( | ||
"overscroll-none", | ||
"overflow-hidden", | ||
// "disable-scroll-bounce" | ||
); | ||
}; | ||
}, []); | ||
}; |