antvis / g6-editor

534 stars 172 forks source link

节点如何用html去实现 #116

Open junob opened 5 years ago

junob commented 5 years ago

group.addShape('dom', { attrs: { x: x + 10, y: y + 12, width: 20, height: 16, html: "444" } });

这样使用为什么老是报如下警告 g6Editor.js?51cd:14173 TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)' at t.drawInner (g6Editor.js?51cd:12572) at t.e._drawShape (g6Editor.js?51cd:14194) at t.e._drawGroup (g6Editor.js?51cd:14189) at t.e._drawGroup (g6Editor.js?51cd:14189) at t.e._drawGroup (g6Editor.js?51cd:14189) at t.e._drawGroup (g6Editor.js?51cd:14189) at n (g6Editor.js?51cd:14170) at t.e.draw (g6Editor.js?51cd:14177) at t.draw (g6Editor.js?51cd:15025) at n.draw (g6Editor.js?51cd:10459)