Remove hitDetectionOrigin
This commit is contained in:
@@ -70,12 +70,6 @@ ol.style.Circle = function(opt_options) {
|
||||
*/
|
||||
this.origin_ = [0, 0];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
*/
|
||||
this.hitDetectionOrigin_ = [0, 0];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
@@ -189,14 +183,6 @@ ol.style.Circle.prototype.getOrigin = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Circle.prototype.getHitDetectionOrigin = function() {
|
||||
return this.hitDetectionOrigin_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Radius.
|
||||
* @api
|
||||
@@ -323,12 +309,10 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
|
||||
|
||||
if (hasCustomHitDetectionImage) {
|
||||
this.hitDetectionCanvas_ = info.hitImage;
|
||||
this.hitDetectionOrigin_ = [info.hitOffsetX, info.hitOffsetY];
|
||||
this.hitDetectionImageSize_ =
|
||||
[info.hitImage.width, info.hitImage.height];
|
||||
} else {
|
||||
this.hitDetectionCanvas_ = this.canvas_;
|
||||
this.hitDetectionOrigin_ = this.origin_;
|
||||
this.hitDetectionImageSize_ = [imageSize, imageSize];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,14 +301,6 @@ ol.style.Icon.prototype.getOrigin = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Icon.prototype.getHitDetectionOrigin = function() {
|
||||
return this.getOrigin();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {string|undefined} Image src.
|
||||
* @api
|
||||
|
||||
@@ -161,13 +161,6 @@ ol.style.Image.prototype.getHitDetectionImageSize = 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.
|
||||
|
||||
@@ -60,12 +60,6 @@ ol.style.RegularShape = function(options) {
|
||||
*/
|
||||
this.origin_ = [0, 0];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
*/
|
||||
this.hitDetectionOrigin_ = [0, 0];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
@@ -219,14 +213,6 @@ ol.style.RegularShape.prototype.getOrigin = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.RegularShape.prototype.getHitDetectionOrigin = function() {
|
||||
return this.hitDetectionOrigin_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Number of points for stars and regular polygons.
|
||||
* @api
|
||||
@@ -370,12 +356,10 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
|
||||
|
||||
if (hasCustomHitDetectionImage) {
|
||||
this.hitDetectionCanvas_ = info.hitImage;
|
||||
this.hitDetectionOrigin_ = [info.hitOffsetX, info.hitOffsetY];
|
||||
this.hitDetectionImageSize_ =
|
||||
[info.hitImage.width, info.hitImage.height];
|
||||
} else {
|
||||
this.hitDetectionCanvas_ = this.canvas_;
|
||||
this.hitDetectionOrigin_ = this.origin_;
|
||||
this.hitDetectionImageSize_ = [imageSize, imageSize];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user