Define browser specific IMAGE_SMOOTHING_DISABLED

Avoid msImageSmoothingEnabled if the browser does not need it
This commit is contained in:
mike-000
2020-04-30 16:49:05 +01:00
committed by GitHub
parent c515183bad
commit 3c1e00a3ec
+7 -4
View File
@@ -1,6 +1,7 @@
/** /**
* @module ol/source/common * @module ol/source/common
*/ */
import {FIREFOX, SAFARI, WEBKIT} from '../has.js';
/** /**
* Default WMS version. * Default WMS version.
@@ -12,7 +13,9 @@ export const DEFAULT_WMS_VERSION = '1.3.0';
* Context options to disable image smoothing. * Context options to disable image smoothing.
* @type {Object} * @type {Object}
*/ */
export const IMAGE_SMOOTHING_DISABLED = { export const IMAGE_SMOOTHING_DISABLED = FIREFOX || SAFARI || WEBKIT
imageSmoothingEnabled: false, ? {imageSmoothingEnabled: false}
msImageSmoothingEnabled: false, : {
}; imageSmoothingEnabled: false,
msImageSmoothingEnabled: false,
};