Use an abstract base class instead of IVectorContext

By having the abstract methods in the base class, subclasses can simply
override the methods they actually provide.
Additionally, this change fixes a regression in webgl canvas immediate.
This commit is contained in:
Guillaume Beraudo
2015-04-04 10:44:04 +02:00
parent a19c58e490
commit 0e32456108
9 changed files with 152 additions and 308 deletions

View File

@@ -2,7 +2,7 @@ goog.provide('ol.render.Event');
goog.provide('ol.render.EventType');
goog.require('goog.events.Event');
goog.require('ol.render.IVectorContext');
goog.require('ol.render.VectorContext');
/**
@@ -34,7 +34,7 @@ ol.render.EventType = {
* @implements {oli.render.Event}
* @param {ol.render.EventType} type Type.
* @param {Object=} opt_target Target.
* @param {ol.render.IVectorContext=} opt_vectorContext Vector context.
* @param {ol.render.VectorContext=} opt_vectorContext Vector context.
* @param {ol.render.IReplayGroup=} opt_replayGroup Replay group.
* @param {olx.FrameState=} opt_frameState Frame state.
* @param {?CanvasRenderingContext2D=} opt_context Context.
@@ -48,7 +48,7 @@ ol.render.Event = function(
/**
* For canvas, this is an instance of {@link ol.render.canvas.Immediate}.
* @type {ol.render.IVectorContext|undefined}
* @type {ol.render.VectorContext|undefined}
* @api
*/
this.vectorContext = opt_vectorContext;