Only set line dash if it is supported
This commit is contained in:
@@ -413,7 +413,9 @@ ol.render.canvas.Immediate.prototype.setFillStrokeStyles_ = function() {
|
|||||||
state.currentLineWidth != lineWidth) {
|
state.currentLineWidth != lineWidth) {
|
||||||
context.strokeStyle = strokeStyle;
|
context.strokeStyle = strokeStyle;
|
||||||
context.lineCap = lineCap;
|
context.lineCap = lineCap;
|
||||||
context.setLineDash(lineDash);
|
if (goog.isDef(context.setLineDash)) {
|
||||||
|
context.setLineDash(lineDash);
|
||||||
|
}
|
||||||
context.lineJoin = lineJoin;
|
context.lineJoin = lineJoin;
|
||||||
context.miterLimit = miterLimit;
|
context.miterLimit = miterLimit;
|
||||||
context.lineWidth = lineWidth;
|
context.lineWidth = lineWidth;
|
||||||
|
|||||||
@@ -198,7 +198,9 @@ ol.render.canvas.Replay.prototype.replay =
|
|||||||
context.lineCap = /** @type {string} */ (instruction[3]);
|
context.lineCap = /** @type {string} */ (instruction[3]);
|
||||||
context.lineJoin = /** @type {string} */ (instruction[4]);
|
context.lineJoin = /** @type {string} */ (instruction[4]);
|
||||||
context.miterLimit = /** @type {number} */ (instruction[5]);
|
context.miterLimit = /** @type {number} */ (instruction[5]);
|
||||||
context.setLineDash(/** @type {Array.<number>} */ (instruction[6]));
|
if (goog.isDef(context.setLineDash)) {
|
||||||
|
context.setLineDash(/** @type {Array.<number>} */ (instruction[6]));
|
||||||
|
}
|
||||||
++i;
|
++i;
|
||||||
} else if (type == ol.render.canvas.Instruction.STROKE) {
|
} else if (type == ol.render.canvas.Instruction.STROKE) {
|
||||||
context.stroke();
|
context.stroke();
|
||||||
|
|||||||
Reference in New Issue
Block a user