Skip to content

Commit 75678bf

Browse files
committed
DVF-3035-ie8-fixes
1 parent 18847fd commit 75678bf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/vector/vml/Renderer.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ acgraph.vector.vml.Renderer.prototype.measure = function(text, style) {
402402
}
403403
if (style.letterSpacing) {
404404
goog.style.setStyle(this.measurementText_, 'letter-spacing', style['letterSpacing']);
405-
this.measurementVMLTextPath_.style['v-text-spacing'] = style['letterSpacing'];
405+
this.measurementVMLTextPath_.style['v-text-spacing'] = style['letterSpacing'] == 'normal' ? '' : style['letterSpacing'];
406406
}
407407
if (style.decoration) {
408408
goog.style.setStyle(this.measurementText_, 'text-decoration', style['decoration']);
@@ -1457,7 +1457,7 @@ acgraph.vector.vml.Renderer.prototype.setTextSegmentProperties = function(elemen
14571457
if (style['fontFamily']) goog.style.setStyle(textNode, 'font-family', style['fontFamily']);
14581458
if (style['fontSize']) goog.style.setStyle(textNode, 'font-size', style['fontSize']);
14591459
if (style['fontWeight']) goog.style.setStyle(textNode, 'font-weight', style['fontWeight']);
1460-
if (style['letterSpacing']) textNode.style['v-text-spacing'] = style['letterSpacing'];
1460+
if (style['letterSpacing']) textNode.style['v-text-spacing'] = style['letterSpacing'] == 'normal' ? '' : style['letterSpacing'];
14611461
if (style['decoration']) goog.style.setStyle(textNode, 'text-decoration', style['decoration']);
14621462
if (style['hAlign']) {
14631463
if (textEntry.rtl)
@@ -2133,8 +2133,10 @@ acgraph.vector.vml.Renderer.prototype.addClip_ = function(element, clipRect, isL
21332133
clipRect = acgraph.math.getBoundsOfRectWithTransform(clipRect, tx);
21342134
} else {
21352135
// element clip
2136-
clipRect.left -= element.getX();
2137-
clipRect.top -= element.getY();
2136+
if (!(element instanceof acgraph.vector.vml.Text && !element.isComplex())) {
2137+
clipRect.left -= element.getX() || 0;
2138+
clipRect.top -= element.getY() || 0;
2139+
}
21382140
}
21392141

21402142
var left = clipRect.left;

0 commit comments

Comments
 (0)