Handle different lineWidth scaling in Safari

This commit is contained in:
Andreas Hocevar
2017-10-11 00:32:45 +02:00
parent 80dbedf946
commit d0092ecd18
3 changed files with 5 additions and 4 deletions

View File

@@ -326,7 +326,7 @@ ol.render.canvas.TextReplay.prototype.getImage_ = function(text, fill, stroke) {
context.font = textState.font;
if (stroke) {
context.strokeStyle = strokeState.strokeStyle;
context.lineWidth = strokeWidth * pixelRatio;
context.lineWidth = strokeWidth * (ol.has.SAFARI ? pixelRatio : 1);
context.lineCap = strokeState.lineCap;
context.lineJoin = strokeState.lineJoin;
context.miterLimit = strokeState.miterLimit;