Remove CANVAS_LINE_DASH from ol/has

Test if `context.setLineDash` is defined instead.
This commit is contained in:
Frederic Junod
2018-12-07 13:13:39 +01:00
parent 4ce5379a4b
commit b3520f8217
4 changed files with 5 additions and 27 deletions

View File

@@ -40,21 +40,6 @@ export const MAC = ua.indexOf('macintosh') !== -1;
export const DEVICE_PIXEL_RATIO = window.devicePixelRatio || 1;
/**
* True if the browser's Canvas implementation implements {get,set}LineDash.
* @type {boolean}
*/
export const CANVAS_LINE_DASH = function() {
let has = false;
try {
has = !!document.createElement('canvas').getContext('2d').setLineDash;
} catch (e) {
// pass
}
return has;
}();
/**
* Is HTML5 geolocation supported in the current browser?
* @const