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:
@@ -9,7 +9,7 @@ goog.require('goog.vec.Mat4');
|
||||
goog.require('ol.color.Matrix');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.render.IReplayGroup');
|
||||
goog.require('ol.render.IVectorContext');
|
||||
goog.require('ol.render.VectorContext');
|
||||
goog.require('ol.render.webgl.imagereplay.shader.Color');
|
||||
goog.require('ol.render.webgl.imagereplay.shader.Default');
|
||||
goog.require('ol.vec.Mat4');
|
||||
@@ -20,13 +20,14 @@ goog.require('ol.webgl.Context');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {ol.render.IVectorContext}
|
||||
* @extends {ol.render.VectorContext}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {ol.Extent} maxExtent Max extent.
|
||||
* @protected
|
||||
* @struct
|
||||
*/
|
||||
ol.render.webgl.ImageReplay = function(tolerance, maxExtent) {
|
||||
goog.base(this);
|
||||
|
||||
/**
|
||||
* @type {number|undefined}
|
||||
@@ -219,8 +220,8 @@ ol.render.webgl.ImageReplay = function(tolerance, maxExtent) {
|
||||
* @private
|
||||
*/
|
||||
this.width_ = undefined;
|
||||
|
||||
};
|
||||
goog.inherits(ol.render.webgl.ImageReplay, ol.render.VectorContext);
|
||||
|
||||
|
||||
/**
|
||||
@@ -380,39 +381,6 @@ ol.render.webgl.ImageReplay.prototype.drawCoordinates_ =
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.drawCircleGeometry = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.drawFeature = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.drawGeometryCollectionGeometry =
|
||||
goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.drawLineStringGeometry =
|
||||
goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.drawMultiLineStringGeometry =
|
||||
goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@@ -427,13 +395,6 @@ ol.render.webgl.ImageReplay.prototype.drawMultiPointGeometry =
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.drawMultiPolygonGeometry =
|
||||
goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@@ -448,18 +409,6 @@ ol.render.webgl.ImageReplay.prototype.drawPointGeometry =
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.drawPolygonGeometry = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.drawText = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.webgl.Context} context Context.
|
||||
*/
|
||||
@@ -1003,12 +952,6 @@ ol.render.webgl.ImageReplay.prototype.setImageStyle = function(imageStyle) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.render.webgl.ImageReplay.prototype.setTextStyle = goog.abstractMethod;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
|
||||
Reference in New Issue
Block a user