Manual class transform

This commit is contained in:
Tim Schaub
2018-07-16 17:09:50 -06:00
parent 7b4a73f3b9
commit f78d0d4cfa
96 changed files with 8112 additions and 7964 deletions

View File

@@ -13,43 +13,45 @@ import Event from '../events/Event.js';
* @param {?CanvasRenderingContext2D=} opt_context Context.
* @param {?module:ol/webgl/Context=} opt_glContext WebGL Context.
*/
const RenderEvent = function(
type, opt_vectorContext, opt_frameState, opt_context,
opt_glContext) {
class RenderEvent {
Event.call(this, type);
constructor(type, opt_vectorContext, opt_frameState, opt_context, opt_glContext) {
/**
* For canvas, this is an instance of {@link module:ol/render/canvas/Immediate}.
* @type {module:ol/render/VectorContext|undefined}
* @api
*/
this.vectorContext = opt_vectorContext;
Event.call(this, type);
/**
* An object representing the current render frame state.
* @type {module:ol/PluggableMap~FrameState|undefined}
* @api
*/
this.frameState = opt_frameState;
/**
* For canvas, this is an instance of {@link module:ol/render/canvas/Immediate}.
* @type {module:ol/render/VectorContext|undefined}
* @api
*/
this.vectorContext = opt_vectorContext;
/**
* Canvas context. Only available when a Canvas renderer is used, null
* otherwise.
* @type {CanvasRenderingContext2D|null|undefined}
* @api
*/
this.context = opt_context;
/**
* An object representing the current render frame state.
* @type {module:ol/PluggableMap~FrameState|undefined}
* @api
*/
this.frameState = opt_frameState;
/**
* WebGL context. Only available when a WebGL renderer is used, null
* otherwise.
* @type {module:ol/webgl/Context|null|undefined}
* @api
*/
this.glContext = opt_glContext;
/**
* Canvas context. Only available when a Canvas renderer is used, null
* otherwise.
* @type {CanvasRenderingContext2D|null|undefined}
* @api
*/
this.context = opt_context;
};
/**
* WebGL context. Only available when a WebGL renderer is used, null
* otherwise.
* @type {module:ol/webgl/Context|null|undefined}
* @api
*/
this.glContext = opt_glContext;
}
}
inherits(RenderEvent, Event);
export default RenderEvent;