-
Notifications
You must be signed in to change notification settings - Fork 199
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
next版本自定义 DataCell,给数值单元格添加HTML内容, HTML会覆盖在冻结行列上方 #2683
Comments
你在 内部单元格已经适配了滚动后的裁剪: S2/packages/s2-core/src/facet/base-facet.ts Lines 1639 to 1654 in 6a71390
你虽然看似是添加在单元格内部, 但是其实元素变成了一个绝对定位的 dom, 而不是一个单元格内部的 Group 图层. this.appendChild(html); 你光设置了 HTML 的 宽高左边和单元格一致, 但是还需考虑滚动的偏移/裁剪等问题, 比如在滚动裁剪溢出部分, 避免遮挡, 需要对源码和 AntV/G 有一定的了解, 上手成本有点高, 不建议在有滚动条的场景中使用, 可以使用 S2/packages/s2-core/src/facet/frozen-facet.ts Lines 718 to 725 in 6a71390
S2/packages/s2-core/src/facet/header/row.ts Lines 134 to 158 in 6a71390
作为类比, 比如单元格内添加一个普通的图形, 都是能正常裁剪覆盖的: const icon = new GuiIcon({
x,
y,
name: 'Plus',
width: 24,
height: 24,
fill: 'red',
});
this.appendChild(icon);
// this.appendChild(html); |
🏷 Version
node: v20.10.0
npm: 9.5.0
"@antv/g": "^6.0.2",
"@antv/s2": "2.0.0-next.17",
"@antv/s2-vue": "2.0.0-next.12",
"vue": "^3.3.8",
appendChild 绘制的图形 始终定位在一处, 未根据所设置的x、y轴坐标定位
The text was updated successfully, but these errors were encountered: