Deprecate the imageSmoothing option for sources

This commit is contained in:
Tim Schaub
2021-12-27 12:25:11 -07:00
parent 8d8632bff7
commit e2883fb658
48 changed files with 538 additions and 191 deletions

View File

@@ -31,6 +31,8 @@ import {get as getProjection} from '../proj.js';
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
* @property {import("./State.js").default} [state='ready'] State.
* @property {boolean} [wrapX=false] WrapX.
* @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
* the nearest neighbor is used when resampling.
*/
/**
@@ -91,6 +93,12 @@ class Source extends BaseObject {
*/
this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;
/**
* @private
* @type {boolean}
*/
this.interpolate_ = !!options.interpolate;
/**
* @protected
* @type {function(import("../View.js").ViewOptions):void}
@@ -172,10 +180,10 @@ class Source extends BaseObject {
}
/**
* @return {Object|undefined} Context options.
* @return {boolean} Use linear interpolation when resampling.
*/
getContextOptions() {
return undefined;
getInterpolate() {
return this.interpolate_;
}
/**