antvis/G6



The issue has been closed
带stroke的rect图形,阴影效果显示问题 #5236
zhuweileo posted onGitHub
Describe the bug
带有stroke属性时,阴影效果会浮现在rect 的 body上面,好像阴影是加在了描边上。 去掉stroke 后效果正常。
const rect = group.addShape('rect', {
attrs: {
x: nodeOrigin.x,
y: nodeOrigin.y,
width: 168,
height: 58,
lineWidth: 1,
fontSize: 12,
fill: '#fff',
radius: 10,
stroke: '#E8E9EC',
opacity: 1,
shadowColor: '#000',
shadowBlur: 1,
shadowOffsetX: 0,
shadowOffsetY: 10,
// ...rectConfig,
},
});
<img width="661" alt="image" src="https://github.com/antvis/G6/assets/22818403/2c7bc38d-7179-4550-845e-fc0b59205269">
Your Example Website or App
https://codesandbox.io/p/sandbox/musing-varahamihira-56snx4?file=%2Findex.js
Steps to Reproduce the Bug or Issue
不需要复现操作,直接可见
Expected behavior
期望带有描边时,阴影效果不被浮现在body上,和dom的阴影效果相似
Screenshots or Videos
No response
Platform
- OS: [macOS]
- Browser: [ Chrome]
- Version: [e.g. 91.1]
Additional context
No response