Merge pull request #7059 from ahocevar/extent-interaction-extent

Allow to configure Extent interaction with an extent
This commit is contained in:
Andreas Hocevar
2017-07-28 15:59:50 +02:00
committed by GitHub
2 changed files with 17 additions and 4 deletions

View File

@@ -76,10 +76,6 @@ ol.interaction.Extent = function(opt_options) {
opt_options = {};
}
if (opt_options.extent) {
this.setExtent(opt_options.extent);
}
/* Inherit ol.interaction.Pointer */
ol.interaction.Pointer.call(this, {
handleDownEvent: ol.interaction.Extent.handleDownEvent_,
@@ -117,6 +113,10 @@ ol.interaction.Extent = function(opt_options) {
updateWhileAnimating: true,
updateWhileInteracting: true
});
if (opt_options.extent) {
this.setExtent(opt_options.extent);
}
};
ol.inherits(ol.interaction.Extent, ol.interaction.Pointer);