mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-31 01:09:22 +02:00
Fix issue where hover sidebar wouldn't be closed when zooming out past editable extent (close #7765)
This commit is contained in:
@@ -593,7 +593,7 @@ export function rendererMap(context) {
|
||||
if (_lastWithinEditableZoom !== withinEditableZoom) {
|
||||
if (_lastWithinEditableZoom !== undefined) {
|
||||
// notify that the map zoomed in or out over the editable zoom threshold
|
||||
dispatch.call('crossEditableZoom', this, map);
|
||||
dispatch.call('crossEditableZoom', this, withinEditableZoom);
|
||||
}
|
||||
_lastWithinEditableZoom = withinEditableZoom;
|
||||
}
|
||||
|
||||
@@ -412,6 +412,13 @@ export function uiSidebar(context) {
|
||||
|
||||
// toggle the sidebar collapse when double-clicking the resizer
|
||||
resizer.on('dblclick', sidebar.toggle);
|
||||
|
||||
// ensure hover sidebar is closed when zooming out beyond editable zoom
|
||||
context.map().on('crossEditableZoom.sidebar', function(within) {
|
||||
if (!within && !selection.select('.inspector-hover').empty()) {
|
||||
hover([]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
sidebar.showPresetList = function() {};
|
||||
|
||||
Reference in New Issue
Block a user