Make strokeKey safer

This commit is contained in:
Andreas Hocevar
2017-11-26 12:50:14 +01:00
parent ceab6444b9
commit f426c1cd18

View File

@@ -533,7 +533,7 @@ ol.render.canvas.TextReplay.prototype.setTextStyle = function(textStyle, declutt
strokeState.lineCap + strokeState.lineDashOffset + '|' + strokeState.lineWidth +
strokeState.lineJoin + strokeState.miterLimit + '[' + strokeState.lineDash.join() + ']' :
'';
this.textKey_ = textState.font + (textState.textAlign || '?') + textState.scale;
this.textKey_ = textState.font + textState.scale + (textState.textAlign || '?');
this.fillKey_ = fillState ?
(typeof fillState.fillStyle == 'string' ? fillState.fillStyle : ('|' + ol.getUid(fillState.fillStyle))) :
'';