Closed jrjdavidson closed 5 years ago
edited original post to a new fiddle that had 'jumpAllowed: true' on the browser
You can prevent this behavior by adding doubleClick event to the panel.
statusDiv.on('dblclick', onDoNothing.bind(this));
the function called by event should look something like this:
function onDoNothing(event) {
vts.dom.preventDefault(event);
vts.dom.stopPropagation(event);
}
There is an example: https://jsfiddle.net/7gmqykjc/
Thanks David. Not sure if it's possible, but might be useful to add this as a default behaviour to elements created by the addControl() method?
If a user double-clicks inside a panel created via the browser.ui.addControl() method, the map will pan to the said location. This doesn't seem to be an issue with other button or panels such as the search input box however. Example of this: https://jsfiddle.net/be637spg/ Double-click where it says 'Nothing hovered'