Fix:修复在Firefox浏览器中富文本节点无法显示的问题
This commit is contained in:
parent
008e697b74
commit
8b8d549abd
@ -140,11 +140,10 @@ function createRichTextNode() {
|
|||||||
height = Math.ceil(height)
|
height = Math.ceil(height)
|
||||||
g.attr('data-width', width)
|
g.attr('data-width', width)
|
||||||
g.attr('data-height', height)
|
g.attr('data-height', height)
|
||||||
html = div.innerHTML
|
|
||||||
let foreignObject = new ForeignObject()
|
let foreignObject = new ForeignObject()
|
||||||
foreignObject.width(width)
|
foreignObject.width(width)
|
||||||
foreignObject.height(height)
|
foreignObject.height(height)
|
||||||
foreignObject.add(SVG(html))
|
foreignObject.add(div.children[0])
|
||||||
g.add(foreignObject)
|
g.add(foreignObject)
|
||||||
return {
|
return {
|
||||||
node: g,
|
node: g,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user