Move olx.render.State to ol/render
This commit is contained in:
@@ -6,6 +6,18 @@ import {create as createTransform, scale as scaleTransform} from './transform.js
|
||||
import CanvasImmediateRenderer from './render/canvas/Immediate.js';
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} State
|
||||
* @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to.
|
||||
* @property {module:ol/Feature~Feature|module:ol/render/Feature~Feature} feature
|
||||
* @property {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry
|
||||
* @property {number} pixelRatio Pixel ratio used by the layer renderer.
|
||||
* @property {number} resolution Resolution that the render batch was created and optimized for.
|
||||
* This is not the view's resolution that is being rendered.
|
||||
* @property {number} rotation Rotation of the rendered layer in radians.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A function to be used when sorting features before rendering.
|
||||
* It takes two instances of {@link module:ol/Feature} or
|
||||
|
||||
@@ -565,7 +565,7 @@ CanvasReplay.prototype.replay_ = function(
|
||||
const coordinateCache = this.coordinateCache_;
|
||||
const viewRotation = this.viewRotation_;
|
||||
|
||||
const state = /** @type {olx.render.State} */ ({
|
||||
const state = /** @type {module:ol/render~State} */ ({
|
||||
context: context,
|
||||
pixelRatio: this.pixelRatio,
|
||||
resolution: this.resolution,
|
||||
|
||||
@@ -20,9 +20,9 @@ import Stroke from '../style/Stroke.js';
|
||||
* Custom renderer function. Takes two arguments:
|
||||
*
|
||||
* 1. The pixel coordinates of the geometry in GeoJSON notation.
|
||||
* 2. The {@link olx.render.State} of the layer renderer.
|
||||
* 2. The {@link module:ol/render~State} of the layer renderer.
|
||||
*
|
||||
* @typedef {function((module:ol/coordinate~Coordinate|Array<module:ol/coordinate~Coordinate>|Array.<Array.<module:ol/coordinate~Coordinate>>),olx.render.State)}
|
||||
* @typedef {function((module:ol/coordinate~Coordinate|Array<module:ol/coordinate~Coordinate>|Array.<Array.<module:ol/coordinate~Coordinate>>),module:ol/render~State)}
|
||||
* RenderFunction
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user