Skip to content

feat: 增加supportCSSTransform#988

Closed
xiaochong44 wants to merge 1 commit intoantvis:masterfrom
xiaochong44:master
Closed

feat: 增加supportCSSTransform#988
xiaochong44 wants to merge 1 commit intoantvis:masterfrom
xiaochong44:master

Conversation

@xiaochong44
Copy link
Copy Markdown

@xiaochong44 xiaochong44 commented Jan 11, 2022

👀 PR includes

✨ Feature

  • New feature
    增加supportCSSTransform设置,解决父元素缩放引起的鼠标定位错乱问题

🎨 Enhance

@github-actions
Copy link
Copy Markdown
Contributor

⚡️ Deploying PR Preview...

@xingwanying
Copy link
Copy Markdown
Member

pr 标题改下~

S2PivotSheetOptions {
// custom data set
readonly dataSet?: (spreadsheet: SpreadSheet) => BaseDataSet;
supportCSSTransform?: boolean;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这个放到 S2BasicOptions 里吧。

*/
protected initGroups() {
const { width, height } = this.options;
const { width, height, supportCSSTransform = false } = this.options;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

默认值统一设置在 packages/s2-core/src/common/constant/options.ts 里面

@lijinke666 lijinke666 added the 🙏 need test cases or docs 需要单元测试或者补充文档 label Jan 11, 2022
@github-actions
Copy link
Copy Markdown
Contributor

你好 @xiaochong44,感谢你的贡献, 为了让代码更健壮, 请补充相应单元测试, 如果有API改动, 请修改 相应的文档

Hello, @xiaochong44, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes.

@xingwanying
Copy link
Copy Markdown
Member

描述里可以关联下 issue #987
如果可以的话顺手改下文档?0,0

@lijinke666
Copy link
Copy Markdown
Member

image

commit 需要 rebase 一下, 请以 feat: 开头

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 11, 2022

Codecov Report

Merging #988 (a1f3477) into master (38e4f93) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #988   +/-   ##
=======================================
  Coverage   71.85%   71.85%           
=======================================
  Files         170      170           
  Lines       12179    12179           
  Branches     2868     2869    +1     
=======================================
  Hits         8751     8751           
  Misses       2222     2222           
  Partials     1206     1206           
Impacted Files Coverage Δ
packages/s2-core/src/sheet-type/spread-sheet.ts 80.86% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38e4f93...a1f3477. Read the comment docs.

*/
protected initGroups() {
const { width, height } = this.options;
const { width, height, supportCSSTransform = false } = this.options;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这个需要做成配置项吗? 是不是直接开启就好了

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@lijinke666 看g2是这么做的,说是实验功能,为了保持api一致性,就写在配置里了

@xiaochong44 xiaochong44 changed the title 增加supportCSSTransform feat: 增加supportCSSTransform Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙏 need test cases or docs 需要单元测试或者补充文档

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants