Remove IE image smoothing fallback
This commit is contained in:
@@ -5,7 +5,6 @@ import CanvasLayerRenderer from './Layer.js';
|
||||
import ImageState from '../../ImageState.js';
|
||||
import ViewHint from '../../ViewHint.js';
|
||||
import {ENABLE_RASTER_REPROJECTION} from '../../reproj/common.js';
|
||||
import {IMAGE_SMOOTHING_DISABLED, IMAGE_SMOOTHING_ENABLED} from './common.js';
|
||||
import {
|
||||
apply as applyTransform,
|
||||
compose as composeTransform,
|
||||
@@ -238,7 +237,7 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
||||
const dh = img.height * transform[3];
|
||||
|
||||
if (!this.getLayer().getSource().getInterpolate()) {
|
||||
Object.assign(context, IMAGE_SMOOTHING_DISABLED);
|
||||
context.imageSmoothingEnabled = false;
|
||||
}
|
||||
|
||||
this.preRender(context, frameState);
|
||||
@@ -261,7 +260,7 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
||||
if (clipped) {
|
||||
context.restore();
|
||||
}
|
||||
Object.assign(context, IMAGE_SMOOTHING_ENABLED);
|
||||
context.imageSmoothingEnabled = true;
|
||||
|
||||
if (canvasTransform !== canvas.style.transform) {
|
||||
canvas.style.transform = canvasTransform;
|
||||
|
||||
@@ -6,7 +6,6 @@ import ImageTile from '../../ImageTile.js';
|
||||
import ReprojTile from '../../reproj/Tile.js';
|
||||
import TileRange from '../../TileRange.js';
|
||||
import TileState from '../../TileState.js';
|
||||
import {IMAGE_SMOOTHING_DISABLED, IMAGE_SMOOTHING_ENABLED} from './common.js';
|
||||
import {
|
||||
apply as applyTransform,
|
||||
compose as composeTransform,
|
||||
@@ -410,7 +409,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
||||
}
|
||||
|
||||
if (!tileSource.getInterpolate()) {
|
||||
Object.assign(context, IMAGE_SMOOTHING_DISABLED);
|
||||
context.imageSmoothingEnabled = false;
|
||||
}
|
||||
|
||||
this.preRender(context, frameState);
|
||||
@@ -561,7 +560,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
||||
if (layerState.extent) {
|
||||
context.restore();
|
||||
}
|
||||
Object.assign(context, IMAGE_SMOOTHING_ENABLED);
|
||||
context.imageSmoothingEnabled = true;
|
||||
|
||||
if (canvasTransform !== canvas.style.transform) {
|
||||
canvas.style.transform = canvasTransform;
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* @module ol/renderer/canvas/common
|
||||
*/
|
||||
|
||||
/**
|
||||
* Context options to disable image smoothing.
|
||||
* @type {Object}
|
||||
*/
|
||||
export const IMAGE_SMOOTHING_DISABLED = {
|
||||
imageSmoothingEnabled: false,
|
||||
msImageSmoothingEnabled: false,
|
||||
};
|
||||
|
||||
/**
|
||||
* Context options to enable image smoothing.
|
||||
* @type {Object}
|
||||
*/
|
||||
export const IMAGE_SMOOTHING_ENABLED = {
|
||||
imageSmoothingEnabled: true,
|
||||
msImageSmoothingEnabled: true,
|
||||
};
|
||||
Reference in New Issue
Block a user