Move olx.render.State to ol/render

This commit is contained in:
Michael Kuenzli
2018-04-18 10:39:05 +02:00
parent 82c55d3892
commit 5e810ccc6a
4 changed files with 15 additions and 49 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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
*/