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