Fixing issue #10497 on behalf of LarryHuang

Since Larry is not able to access github, i'm committing on behalf of him, explanation of the issue and he's original fix can be found https://github.com/openlayers/openlayers/issues/10497
This commit is contained in:
gazza0
2020-01-09 02:52:21 -08:00
committed by GitHub
parent 44fab1000e
commit 420e7d87ae

View File

@@ -460,7 +460,7 @@ class CanvasTextBuilder extends CanvasBuilder {
strokeState.lineCap + strokeState.lineDashOffset + '|' + strokeState.lineWidth +
strokeState.lineJoin + strokeState.miterLimit + '[' + strokeState.lineDash.join() + ']' :
'';
this.textKey_ = textState.font + textState.scale + (textState.textAlign || '?');
this.textKey_ = textState.font + textState.scale + (textState.textAlign || '?') + (textState.textBaseline || '?');
this.fillKey_ = fillState ?
(typeof fillState.fillStyle == 'string' ? fillState.fillStyle : ('|' + getUid(fillState.fillStyle))) :
'';