diff --git a/src/ol/style/circlestyle.js b/src/ol/style/circlestyle.js index 96632d06aa..d6b459b89f 100644 --- a/src/ol/style/circlestyle.js +++ b/src/ol/style/circlestyle.js @@ -70,12 +70,6 @@ ol.style.Circle = function(opt_options) { */ this.origin_ = [0, 0]; - /** - * @private - * @type {Array.} - */ - this.hitDetectionOrigin_ = [0, 0]; - /** * @private * @type {Array.} @@ -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]; } } diff --git a/src/ol/style/iconstyle.js b/src/ol/style/iconstyle.js index 9913c6412a..e9130b3b06 100644 --- a/src/ol/style/iconstyle.js +++ b/src/ol/style/iconstyle.js @@ -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 diff --git a/src/ol/style/imagestyle.js b/src/ol/style/imagestyle.js index d34d74ce3b..1cb95b241e 100644 --- a/src/ol/style/imagestyle.js +++ b/src/ol/style/imagestyle.js @@ -161,13 +161,6 @@ ol.style.Image.prototype.getHitDetectionImageSize = goog.abstractMethod; ol.style.Image.prototype.getOrigin = goog.abstractMethod; -/** - * @function - * @return {Array.} Origin for the hit-detection image. - */ -ol.style.Image.prototype.getHitDetectionOrigin = goog.abstractMethod; - - /** * @function * @return {ol.Size} Size. diff --git a/src/ol/style/regularshapestyle.js b/src/ol/style/regularshapestyle.js index cde61ff429..fb52b18600 100644 --- a/src/ol/style/regularshapestyle.js +++ b/src/ol/style/regularshapestyle.js @@ -60,12 +60,6 @@ ol.style.RegularShape = function(options) { */ this.origin_ = [0, 0]; - /** - * @private - * @type {Array.} - */ - 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]; } } diff --git a/test/spec/ol/style/circlestyle.test.js b/test/spec/ol/style/circlestyle.test.js index 4e5d0b985c..20b42b142d 100644 --- a/test/spec/ol/style/circlestyle.test.js +++ b/test/spec/ol/style/circlestyle.test.js @@ -16,7 +16,6 @@ describe('ol.style.Circle', function() { expect(style.getImage()).to.not.be(style.getHitDetectionImage()); expect(style.getHitDetectionImage()).to.be.an(HTMLCanvasElement); expect(style.getHitDetectionImageSize()).to.eql([21, 21]); - expect(style.getHitDetectionOrigin()).to.eql([0, 0]); }); it('creates a canvas if no atlas is used (fill-style)', function() { @@ -35,7 +34,6 @@ describe('ol.style.Circle', function() { expect(style.getImage()).to.be(style.getHitDetectionImage()); expect(style.getHitDetectionImage()).to.be.an(HTMLCanvasElement); expect(style.getHitDetectionImageSize()).to.eql([21, 21]); - expect(style.getHitDetectionOrigin()).to.eql([0, 0]); }); it('adds itself to an atlas manager (no fill-style)', function() { @@ -50,7 +48,6 @@ describe('ol.style.Circle', function() { expect(style.getImage()).to.not.be(style.getHitDetectionImage()); expect(style.getHitDetectionImage()).to.be.an(HTMLCanvasElement); expect(style.getHitDetectionImageSize()).to.eql([512, 512]); - expect(style.getHitDetectionOrigin()).to.eql([1, 1]); }); it('adds itself to an atlas manager (fill-style)', function() { @@ -71,7 +68,6 @@ describe('ol.style.Circle', function() { expect(style.getImage()).to.be(style.getHitDetectionImage()); expect(style.getHitDetectionImage()).to.be.an(HTMLCanvasElement); expect(style.getHitDetectionImageSize()).to.eql([512, 512]); - expect(style.getHitDetectionOrigin()).to.eql([1, 1]); }); }); diff --git a/test/spec/ol/style/regularshapestyle.test.js b/test/spec/ol/style/regularshapestyle.test.js index f972ae7fc6..8df8e55e98 100644 --- a/test/spec/ol/style/regularshapestyle.test.js +++ b/test/spec/ol/style/regularshapestyle.test.js @@ -49,7 +49,6 @@ describe('ol.style.RegularShape', function() { expect(style.getImage()).to.not.be(style.getHitDetectionImage()); expect(style.getHitDetectionImage()).to.be.an(HTMLCanvasElement); expect(style.getHitDetectionImageSize()).to.eql([21, 21]); - expect(style.getHitDetectionOrigin()).to.eql([0, 0]); }); it('creates a canvas if no atlas is used (fill-style)', function() { @@ -68,7 +67,6 @@ describe('ol.style.RegularShape', function() { expect(style.getImage()).to.be(style.getHitDetectionImage()); expect(style.getHitDetectionImage()).to.be.an(HTMLCanvasElement); expect(style.getHitDetectionImageSize()).to.eql([21, 21]); - expect(style.getHitDetectionOrigin()).to.eql([0, 0]); }); it('adds itself to an atlas manager (no fill-style)', function() { @@ -84,7 +82,6 @@ describe('ol.style.RegularShape', function() { expect(style.getImage()).to.not.be(style.getHitDetectionImage()); expect(style.getHitDetectionImage()).to.be.an(HTMLCanvasElement); expect(style.getHitDetectionImageSize()).to.eql([512, 512]); - expect(style.getHitDetectionOrigin()).to.eql([1, 1]); }); it('adds itself to an atlas manager (fill-style)', function() { @@ -105,7 +102,6 @@ describe('ol.style.RegularShape', function() { expect(style.getImage()).to.be(style.getHitDetectionImage()); expect(style.getHitDetectionImage()).to.be.an(HTMLCanvasElement); expect(style.getHitDetectionImageSize()).to.eql([512, 512]); - expect(style.getHitDetectionOrigin()).to.eql([1, 1]); }); });