Closed simaQ closed 4 months ago
- [ ] 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 中修复。canvas.draw()
,会重复绘制而没有清空之前的内容。canvas.set('autoDraw', false)
不生效。