-
-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(facade): add sheet hooks, onCellPointerMove hook #2193
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2193 +/- ##
======================================
Coverage ? 30.91%
======================================
Files ? 1209
Lines ? 66690
Branches ? 14094
======================================
Hits ? 20620
Misses ? 46070
Partials ? 0 ☔ View full report in Codecov by Sentry. |
View Deployment
|
Origin Title: feat(facade): add sheet hooks, onCellPointerMove hook Title: feat(facade): add sheet hooks, onCellPointerMove hook By listening to the currentCell changes of HoverManagerService, the current cell information is thrown out to facilitate users to drag and drop externally. How to test?
window.univerAPI.getSheetHooks().onCellPointerMove((cell) => {
const { location, position } = cell
window.univerAPI?.getActiveWorkbook()?.getActiveSheet()?.getRange(location.row, location.col)?.setBackgroundColor('red');
})
|
LGTM |
div在拖拽的时候,钩子不会执行。 <button draggable
|
When the div is dragged, the hook will not be executed. <button draggable
|
close #1176
close #1425
通过监听 HoverManagerService 的 currentCell 变化来抛出当前单元格信息,便于用户在外部做拖拽放置
如何测试?