Implement getImageSize in ol.style.Circle and RegularShape
This commit is contained in:
@@ -506,7 +506,6 @@ ol.render.webgl.ImageReplay.prototype.setImageStyle = function(imageStyle) {
|
|||||||
goog.asserts.assert(!goog.isNull(anchor));
|
goog.asserts.assert(!goog.isNull(anchor));
|
||||||
var image = imageStyle.getImage(1);
|
var image = imageStyle.getImage(1);
|
||||||
goog.asserts.assert(!goog.isNull(image));
|
goog.asserts.assert(!goog.isNull(image));
|
||||||
// FIXME getImageSize does not exist for circles
|
|
||||||
var imageSize = imageStyle.getImageSize();
|
var imageSize = imageStyle.getImageSize();
|
||||||
goog.asserts.assert(!goog.isNull(imageSize));
|
goog.asserts.assert(!goog.isNull(imageSize));
|
||||||
var opacity = imageStyle.getOpacity();
|
var opacity = imageStyle.getOpacity();
|
||||||
|
|||||||
@@ -137,6 +137,14 @@ ol.style.Circle.prototype.getImageState = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.style.Circle.prototype.getImageSize = function() {
|
||||||
|
return this.size_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
|
|||||||
@@ -132,6 +132,12 @@ ol.style.Image.prototype.getImage = goog.abstractMethod;
|
|||||||
ol.style.Image.prototype.getImageState = goog.abstractMethod;
|
ol.style.Image.prototype.getImageState = goog.abstractMethod;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {ol.Size} Image size.
|
||||||
|
*/
|
||||||
|
ol.style.Image.prototype.getImageSize = goog.abstractMethod;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element.
|
* @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element.
|
||||||
|
|||||||
@@ -147,6 +147,14 @@ ol.style.RegularShape.prototype.getImage = function(pixelRatio) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.style.RegularShape.prototype.getImageSize = function() {
|
||||||
|
return this.size_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user