Allow mouse input if map is rendered in an other window

This commit is contained in:
elnabo
2020-10-01 12:24:28 +02:00
parent aa69c5d3aa
commit 81103c9253
3 changed files with 20 additions and 18 deletions

View File

@@ -250,9 +250,10 @@ class ZoomSlider extends Control {
if (this.dragListenerKeys_.length === 0) {
const drag = this.handleDraggerDrag_;
const end = this.handleDraggerEnd_;
const doc = this.getMap().getOwnerDocument();
this.dragListenerKeys_.push(
listen(document, PointerEventType.POINTERMOVE, drag, this),
listen(document, PointerEventType.POINTERUP, end, this)
listen(doc, PointerEventType.POINTERMOVE, drag, this),
listen(doc, PointerEventType.POINTERUP, end, this)
);
}
}