Skip to content

Commit

Permalink
Merge pull request #5204 from camptocamp/GSGMF-1125
Browse files Browse the repository at this point in the history
Don't stop events for the helpTooltipOverlay
  • Loading branch information
fredj authored Oct 8, 2019
2 parents d1ed90e + aecedad commit f58f57b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/interaction/Measure.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ class Measure extends olInteractionInteraction {
this.helpTooltipElement_ = document.createElement('div');
this.helpTooltipElement_.classList.add('tooltip');
this.helpTooltipOverlay_ = new olOverlay({
stopEvent: false,
element: this.helpTooltipElement_,
offset: [15, 0],
positioning: 'center-left'
Expand Down
10 changes: 4 additions & 6 deletions src/interaction/ModifyCircle.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export default class extends olInteractionPointer {
*/
setMap(map) {
this.overlay_.setMap(map);
olInteractionPointer.prototype.setMap.call(this, map);
super.setMap(map);
}

/**
Expand Down Expand Up @@ -299,8 +299,7 @@ export default class extends olInteractionPointer {
[pixel[0] + this.pixelTolerance_, pixel[1] - this.pixelTolerance_]);
const box = olExtent.boundingExtent([lowerLeft, upperRight]);

const rBush = this.rBush_;
const nodes = rBush.getInExtent(box);
const nodes = this.rBush_.getInExtent(box);
if (nodes.length > 0) {
nodes.sort(sortByDistance);
const node = nodes[0];
Expand Down Expand Up @@ -340,8 +339,7 @@ export default class extends olInteractionPointer {
}
}
if (this.vertexFeature_) {
/** @type {olSourceVector<import("ol/geom/Geometry.js").default>} */(this.overlay_.getSource())
.removeFeature(this.vertexFeature_);
this.overlay_.getSource().removeFeature(this.vertexFeature_);
this.vertexFeature_ = null;
}
}
Expand Down Expand Up @@ -464,7 +462,7 @@ export default class extends olInteractionPointer {
this.handlePointerMove_(mapBrowserEvent);
}

return olInteractionPointer.prototype.handleEvent.call(this, mapBrowserEvent) && !handled;
return super.handleEvent(mapBrowserEvent) && !handled;
}
}

Expand Down

0 comments on commit f58f57b

Please sign in to comment.