Add imageSize and origin for hit-detection image
This commit is contained in:
@@ -246,6 +246,14 @@ ol.style.Icon.prototype.getImageSize = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Icon.prototype.getHitDetectionImageSize = function() {
|
||||
return this.getImageSize();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@@ -293,6 +301,14 @@ ol.style.Icon.prototype.getOrigin = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Icon.prototype.getHitDetectionOrigin = function() {
|
||||
return this.getOrigin();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {string|undefined} Image src.
|
||||
* @api
|
||||
|
||||
@@ -126,6 +126,13 @@ ol.style.Image.prototype.getAnchor = goog.abstractMethod;
|
||||
ol.style.Image.prototype.getImage = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element.
|
||||
*/
|
||||
ol.style.Image.prototype.getHitDetectionImage = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.style.ImageState} Image state.
|
||||
*/
|
||||
@@ -139,10 +146,9 @@ ol.style.Image.prototype.getImageSize = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element.
|
||||
* @return {ol.Size} Size of the hit-detection image.
|
||||
*/
|
||||
ol.style.Image.prototype.getHitDetectionImage = goog.abstractMethod;
|
||||
ol.style.Image.prototype.getHitDetectionImageSize = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
@@ -152,6 +158,13 @@ ol.style.Image.prototype.getHitDetectionImage = goog.abstractMethod;
|
||||
ol.style.Image.prototype.getOrigin = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @function
|
||||
* @return {Array.<number>} Origin for the hit-detection image.
|
||||
*/
|
||||
ol.style.Image.prototype.getHitDetectionOrigin = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @function
|
||||
* @return {ol.Size} Size.
|
||||
|
||||
Reference in New Issue
Block a user