Use ol.BrowserFeature.HAS_CANVAS_LINE_DASH in ol.render.canvas.Replay

This commit is contained in:
Tom Payne
2014-02-12 17:57:29 +01:00
parent 1924e2b9b3
commit a74da436d2

View File

@@ -10,6 +10,7 @@ goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.object');
goog.require('goog.vec.Mat4');
goog.require('ol.BrowserFeature');
goog.require('ol.array');
goog.require('ol.color');
goog.require('ol.extent');
@@ -344,7 +345,7 @@ ol.render.canvas.Replay.prototype.replay_ =
context.lineCap = /** @type {string} */ (instruction[3]);
context.lineJoin = /** @type {string} */ (instruction[4]);
context.miterLimit = /** @type {number} */ (instruction[5]);
if (goog.isDef(context.setLineDash)) {
if (ol.BrowserFeature.HAS_CANVAS_LINE_DASH) {
context.setLineDash(/** @type {Array.<number>} */ (instruction[6]));
}
++i;