Skip to content
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): click to get cell information, whether to merge and coordinates #2362

Merged
merged 8 commits into from
Jun 1, 2024

Conversation

m310851010
Copy link
Contributor

@m310851010 m310851010 commented May 30, 2024

…rdinates

close #1578 #1550

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

Copy link

github-actions bot commented May 30, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@Dushusir
Copy link
Member

很好的想法,感谢你的贡献。

单元格单击时会触发 onSelectionChange,双击会进入编辑态,可以用 监听command实现 'sheet.operation.set-cell-edit-visible',建议在获取到 选区之后,在range中取数据,比如实现 isMerged() #1578, getPosition(): IPosition #1550

@univer-bot
Copy link

univer-bot bot commented May 30, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Great idea, thanks for your contribution.

OnSelectionChange will be triggered when a cell is clicked, and it will enter the editing state when double-clicked. You can use the listening command to implement 'sheet.operation.set-cell-edit-visible'. It is recommended that after obtaining the selection, get the data in the range, such as implementing isMerged () #1578, getPosition(): IPosition #1550

@m310851010
Copy link
Contributor Author

很好的想法,感谢你的贡献。

单元格单击时会触发 onSelectionChange,双击会进入编辑态,可以用 监听command实现 'sheet.operation.set-cell-edit-visible',建议在获取到 选区之后,在range中取数据,比如实现 isMerged() #1578, getPosition(): IPosition #1550

这里要明确捕获点击事件,而sheet.operation.set-cell-edit-visible不够明确,比如设置值也会触发sheet.operation.set-cell-edit-visible

@univer-bot
Copy link

univer-bot bot commented May 30, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Great idea, thanks for your contribution.

OnSelectionChange will be triggered when the cell is clicked, and it will enter the editing state when double-clicked. You can use the listening command to implement 'sheet.operation.set-cell-edit-visible'. It is recommended to get the data in the range after obtaining the selection, such as implementing isMerged() #1578, getPosition(): IPosition #1550

Click events must be captured clearly here, but sheet.operation.set-cell-edit-visible is not clear enough. For example, setting a value will also trigger sheet.operation.set-cell-edit-visible

@m310851010
Copy link
Contributor Author

m310851010 commented May 31, 2024

很好的想法,感谢你的贡献。

单元格单击时会触发 onSelectionChange,双击会进入编辑态,可以用 监听command实现 'sheet.operation.set-cell-edit-visible',建议在获取到 选区之后,在range中取数据,比如实现 isMerged() #1578, getPosition(): IPosition #1550

已修改 “获取到选区之后,在range中取数据”,在FRange中提供了isMerged 和getCellRect两个函数

@univer-bot
Copy link

univer-bot bot commented May 31, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Great idea, thanks for your contribution.

OnSelectionChange will be triggered when the cell is clicked, and it will enter the editing state when double-clicked. You can use the listening command to implement 'sheet.operation.set-cell-edit-visible'. It is recommended to get the data in the range after obtaining the selection, such as implementing isMerged() #1578, getPosition(): IPosition #1550

Modified "After obtaining the selection, get the data in the range". Two functions, isMerged and getCellRect, are provided in FRange.

Copy link
Member

@Dushusir Dushusir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution

@Dushusir Dushusir merged commit 1300ebc into dream-num:dev Jun 1, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] click and dbclick,get whether to merge cells
2 participants