Fix:修复safari浏览器节点存在图标时文字位置错位的问题
This commit is contained in:
parent
f087b7102e
commit
794d3e9a53
@ -360,7 +360,8 @@ class Node {
|
|||||||
// 文字
|
// 文字
|
||||||
if (this._textData) {
|
if (this._textData) {
|
||||||
this._textData.node.attr('data-offsetx', textContentOffsetX)
|
this._textData.node.attr('data-offsetx', textContentOffsetX)
|
||||||
this._textData.node.x(textContentOffsetX).y(0)
|
// 修复safari浏览器节点存在图标时文字位置不正确的问题
|
||||||
|
;(this._textData.nodeContent || this._textData.node).x(textContentOffsetX).y(0)
|
||||||
textContentNested.add(this._textData.node)
|
textContentNested.add(this._textData.node)
|
||||||
textContentOffsetX += this._textData.width + textContentItemMargin
|
textContentOffsetX += this._textData.width + textContentItemMargin
|
||||||
}
|
}
|
||||||
|
|||||||
@ -170,6 +170,7 @@ function createRichTextNode() {
|
|||||||
g.add(foreignObject)
|
g.add(foreignObject)
|
||||||
return {
|
return {
|
||||||
node: g,
|
node: g,
|
||||||
|
nodeContent: foreignObject,
|
||||||
width,
|
width,
|
||||||
height
|
height
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user