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

fix(s2-core): 修复延迟销毁表格时没有移除canvas节点的问题 close #1011 #1033

Merged
merged 1 commit into from Jan 21, 2022

Conversation

lijinke666
Copy link
Member

👀 PR includes

🐛 Bugfix

📝 Description

destroy 方法没有销毁 g 生成的 canvas 节点, 如果公用一个 container 会导致销毁后再创建新表格时, 页面上会出现两个表格

const pivotSheet = new PivotSheet(container, mockDataConfig, s2options);
pivotSheet.render();

pivotSheet.destroy();

const tableSheet = new TableSheet(container, mockDataConfig, s2options);
tableSheet.render();

🔗 Related issue link

🔍 Self Check before Merge

  • Add or update relevant Docs.
  • Add or update relevant Demos.
  • Add or update relevant TypeScript definitions.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2022

🎊 PR Preview has been successfully built and deployed to https://s2-preview-pr-1033.surge.sh

@codecov
Copy link

codecov bot commented Jan 21, 2022

Codecov Report

Merging #1033 (90d93b8) into master (2082c22) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1033      +/-   ##
==========================================
+ Coverage   71.88%   72.02%   +0.14%     
==========================================
  Files         170      170              
  Lines       12243    12244       +1     
  Branches     2884     2884              
==========================================
+ Hits         8801     8819      +18     
+ Misses       2244     2232      -12     
+ Partials     1198     1193       -5     
Impacted Files Coverage Δ
packages/s2-core/src/sheet-type/spread-sheet.ts 80.95% <100.00%> (+0.08%) ⬆️
packages/s2-core/src/facet/header/corner.ts 79.24% <0.00%> (+2.51%) ⬆️
packages/s2-core/src/facet/header/row.ts 67.02% <0.00%> (+5.31%) ⬆️
packages/s2-core/src/sheet-type/table-sheet.ts 62.32% <0.00%> (+5.47%) ⬆️

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 2082c22...90d93b8. Read the comment docs.

@github-actions
Copy link
Contributor

Size Change: +258 B (0%)

Total Size: 189 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 118 kB -111 B (0%)
./packages/s2-react/dist/index.min.js 67.9 kB +369 B (+1%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 356 B
./packages/s2-react/dist/style.min.css 3.1 kB

compressed-size-action

@xingwanying xingwanying merged commit 608dc49 into master Jan 21, 2022
@xingwanying xingwanying deleted the fix-destroy-table branch January 21, 2022 08:13
YardWill added a commit that referenced this pull request Jan 24, 2022
* chore: 🤖 auto sync site s2 lock and changelog [skip ci] (#1004)

* chore(release): 🔖@antv/s2@1.2.0  @antv/s2-react@1.2.0

* chore(release): 🔖 @antv/s2@1.2.0  @antv/s2-react@1.2.0

* chore(release): 🤖 @antv/s2-v1.3.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.3.0 [skip ci]

* chore(release): 🔖@antv/s2@1.4.0 @antv/s2-react@1.4.0

* chore(release): 🤖 @antv/s2-v1.4.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.4.0 [skip ci]

* chore(release): 🔖@antv/s2@1.5.0 @antv/s2-react@1.4.1

* chore(release): 🤖 @antv/s2-v1.5.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.5.0 [skip ci]

* chore(release): @antv/s2@1.6.0 @antv/s2-react@1.6.0 (#1003)

* chore(release): 🤖 @antv/s2-v1.6.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.6.0 [skip ci]

* chore: 🤖 auto sync site s2 lock and changelog [skip ci]

Co-authored-by: yingying.xwy <yingying.xwy@antgroup.com>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
Co-authored-by: xinhui.zxh <xinhui.zxh@antgroup.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update base-facet.ts (#1009)

手机端滑动问题修改

* docs: 修复文档404链接和报错demo (#1025)

* chore(ci): 新增 prerelease 推送 & CI 细节调整 (#1027)

* chore(ci): 新增 prerelease 推送 & ci 细节调整

* chore(ci): 去掉 --ignore-scripts

* chore(ci): 去掉 --ignore-scripts

* fix(facet): scroll speed options & pagination totals (#1031)

* fix: scrollSpeedRatio value

* fix: ts err

* fix: revert change

* fix: pagination total

* fix(s2-core): 修复延迟销毁表格时没有移除canvas节点的问题 close #1011 (#1033)

* docs: 增加小册子demo《哲学家的观点》 (#1035)

* fix(tooltip): 修复单元格文字过长时 tooltip 显示被截断 close #1028 (#1034)

* feat: 支持配置前端计算小计/总计 (#921)

* feat: surport caculate totals in pivot data set

* test: add number calculate and totals calculate test

* refactor: change totals type to readonly

* refactor: code style

* refactor: code style and optimize test

* docs: add calcTotals's docs and demos

* fix: get cell data

* test: table facet test's width

* feat: 重构前端计算汇总值

* test: 增加前端计算totals测试

* refactor: 抽离getAggregationAndCalcFuncByQuery到utils

* test: 增加getAggregationAndCalcFuncByQuery的测试

* docs: 小计总计文档更新

* fix(tooltip): 修复明细表列头的 tooltip 内容被错误的格式化 close #998 (#1036)

* fix(tooltip): 修复明细表列头的 tooltip 内容被错误的格式化 close #998

* chore: 还原 meta

* test: 修复测试

* fix(interactive): table move problem (#1013)

* fix: table move problem

* fix: code

* fix: v

* fix: move

* fix: calculateInViewIndexes

* feat: update table facet

* fix: v

* fix: code 整理

* fix: 修复测试用例

Co-authored-by: xinhui.zxh <xinhui.zxh@antgroup.com>

* docs: 优化demo《哲学家的观点》 (#1038)

* feat: 完善交叉表分页功能 (#1037)

* chore: s2-react watch script

* fix: maxHeight等于offset数组值时下标返回偏大

* fix(s2react): 交叉表初始化未更新分页total

* fix(facet): 序号列无法渲染

* fix(pivotfacet): 渲染行数返回错误

* fix(facet): 按视窗高度剪裁行头和序号列

* fix: 计算文字位置时应使用viewportHeight视窗高度

* fix(facet): rowIndexHeader可能为null

* fix(facet): 序号列应早于列头添加到group (#1040)

* chore(release): @antv/s2@1.7.0 @antv/s2-react@1.7.0 (#1039)

* chore(release): @antv/s2@1.7.0 @antv/s2-react@1.7.0 (#1039) (#1041)

This reverts commit 0d538f2.

* chore(release): @antv/s2@1.7.0 @antv/s2-react@1.6.1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yingying.xwy <yingying.xwy@antgroup.com>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
Co-authored-by: xinhui.zxh <xinhui.zxh@antgroup.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: gehaiyi <1105993686@qq.com>
Co-authored-by: Jinke Li <a1231236677287@163.com>
Co-authored-by: yangzhanmei <15809244435@163.com>
Co-authored-by: 刘嘉一 <lcx.seima@gmail.com>
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v1.7.0-alpha.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛延时destroy表格无效
2 participants