antvis/G6

Do you want to work on this issue?
You can request for a bounty in order to promote it!
火狐浏览器combo底图不会拉长 #5973
theDoinb posted onGitHub
Describe the bug / 问题描述
我给combo一个底图,并且随着节点拖拽改变其大小,但在火狐上底图会一直应用当前combo的最小宽或高,不会正确的拉伸,但在谷歌浏览器上是正确的,请问有什么方法可以解决?
G6.registerCombo(
'cloud-combo',
{
afterDraw: function(cfg, group) {
group.addShape('image', {
draggable: true,
name: 'combo-image',
attrs: {
}
});
},
afterUpdate: function afterUpdate(cfg, combo) {
const style = this.getShapeStyle(cfg);
const group = combo.get('group');
const marker = group.find((ele) => ele.get('name') === 'combo-image');
marker.attr({
x: -style.width/2,
y: -style.height/2,
width: style.width,
height: style.height,
// padding: 0,
img: comboIcon
});
},
},
'rect',
);
Reproduction link / 重现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
G6 Version / G6 版本
4.x
Operating System / 操作系统
Windows
Browser / 浏览器
Firefox
Additional context / 补充说明
No response