change option name to imageSmoothing

This commit is contained in:
mike-000
2020-04-02 16:25:25 +01:00
parent 874b850d76
commit 1cd4d37c45
14 changed files with 36 additions and 36 deletions
+5 -4
View File
@@ -10,6 +10,7 @@ import EventType from '../events/EventType.js';
import {equivalent, get as getProjection} from '../proj.js';
import ReprojTile from '../reproj/Tile.js';
import UrlTile from './UrlTile.js';
import {IMAGE_SMOOTHING_DISABLED} from './common.js';
import {getKey, getKeyZXY} from '../tilecoord.js';
import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
@@ -21,12 +22,11 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
* @property {boolean} [imageSmoothing=true] Enable image smoothing.
* @property {boolean} [opaque=true] Whether the layer is opaque.
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
* Higher values can increase reprojection performance, but decrease precision.
* @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used
* for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing.
* @property {import("./State.js").default} [state] Source state.
* @property {typeof import("../ImageTile.js").default} [tileClass] Class used to instantiate image tiles.
* Default is {@link module:ol/ImageTile~ImageTile}.
@@ -129,7 +129,8 @@ class TileImage extends UrlTile {
* @private
* @type {object|undefined}
*/
this.reprojectionContextOptions_ = options.reprojectionContextOptions;
this.contextOptions_ = options.imageSmoothing === false ?
IMAGE_SMOOTHING_DISABLED : undefined;
/**
* @private
@@ -304,7 +305,7 @@ class TileImage extends UrlTile {
function(z, x, y, pixelRatio) {
return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);
}.bind(this), this.reprojectionErrorThreshold_,
this.renderReprojectionEdges_, this.reprojectionContextOptions_);
this.renderReprojectionEdges_, this.contextOptions_);
newTile.key = key;
if (tile) {