G
G copied to clipboard
g-svg 问题汇总
- [x] group 设置 clip 后进行动画,动画结束后将 clipShape 移除,group 上的图形也被移除了,复现 riddle: http://riddle.alibaba-inc.com/riddles/ebaecdaa
clipShape.animate({
height: 160
}, {
duration: 1000,
easing: 'easeQuadOut',
callback: () => {
// 移除 clipShape
group.set('clipShape', null);
clipShape.remove(true); // 动画结束需要将剪切图形销毁
}
});
- [x] group matrix 动画不执行
复现 demos : http://riddle.alibaba-inc.com/riddles/cf9bea7
- [x] React 的 opacity 不生效
http://riddle.alibaba-inc.com/riddles/8b40fef3
- [x] fill: null,先被填充成黑色
复现 DEMO: http://riddle.alibaba-inc.com/riddles/722198f9
- [ ] group 设置 clip 后进行动画,动画结束后将 clipShape 移除,group 上的图形也被移除了,复现 riddle: http://riddle.alibaba-inc.com/riddles/ebaecdaa
clipShape.animate({ height: 160 }, { duration: 1000, easing: 'easeQuadOut', callback: () => { // 移除 clipShape group.set('clipShape', null); clipShape.remove(true); // 动画结束需要将剪切图形销毁 } });
-
clip
相关的还是通过setClip
和getClip
两个接口方法去操作,不推荐直接设置clipShape
的方式。通过setClip(null)
是生效的,不过clipShape.remove(true)
的处理逻辑有问题,已 #394 中修复。
- [ ] 所有 shape 不和 Shape、Group、Canvas 同级导出吗?https://github.com/antvis/g/blob/master/packages/g-canvas/src/index.ts#L1
- [ ] SVG 元素事件 mouseenter 等事件不响应: https://riddle.alibaba-inc.com/riddles/75a38a00
- [x] SVG 调用
canvas.draw()
,会重复绘制而没有清空之前的内容。 - [x]
canvas.set('autoDraw', false)
不生效。