mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-03 17:12:31 +00:00
reset geocoder suggestions when input changes, closes #99
This commit is contained in:
@@ -140,6 +140,8 @@
|
|||||||
// Trigger search on Enter key only
|
// Trigger search on Enter key only
|
||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
onKeyDown.apply(geocoder, [{ target: geocoder._inputEl }]);
|
onKeyDown.apply(geocoder, [{ target: geocoder._inputEl }]);
|
||||||
|
} else if (geocoder._typeahead.data.length > 0) {
|
||||||
|
geocoder._typeahead.clear();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
newMap.addControl(geocoder);
|
newMap.addControl(geocoder);
|
||||||
@@ -211,9 +213,7 @@
|
|||||||
<div {...$$restProps}>
|
<div {...$$restProps}>
|
||||||
<div id="map" class="h-full {webgl2Supported ? '' : 'hidden'}"></div>
|
<div id="map" class="h-full {webgl2Supported ? '' : 'hidden'}"></div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-center justify-center gap-3 h-full {webgl2Supported
|
class="flex flex-col items-center justify-center gap-3 h-full {webgl2Supported ? 'hidden' : ''}"
|
||||||
? 'hidden'
|
|
||||||
: ''}"
|
|
||||||
>
|
>
|
||||||
<p>{$_('webgl2_required')}</p>
|
<p>{$_('webgl2_required')}</p>
|
||||||
<Button href="https://get.webgl.org/webgl2/" target="_blank">
|
<Button href="https://get.webgl.org/webgl2/" target="_blank">
|
||||||
|
Reference in New Issue
Block a user