Only set line dash if it is supported

This commit is contained in:
Tom Payne
2013-11-28 17:51:59 +01:00
parent 8d40308d6e
commit f38e5f5f28
2 changed files with 6 additions and 2 deletions

View File

@@ -198,7 +198,9 @@ ol.render.canvas.Replay.prototype.replay =
context.lineCap = /** @type {string} */ (instruction[3]);
context.lineJoin = /** @type {string} */ (instruction[4]);
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;
} else if (type == ol.render.canvas.Instruction.STROKE) {
context.stroke();