Fix issue where currently drawn feature could be discarded when switching the background while navigating the map (close #7999)

This commit is contained in:
Quincy Morgan
2020-09-25 15:19:18 -04:00
parent 3feafa18af
commit 74f473f5a5
+3 -3
View File
@@ -140,12 +140,12 @@ export function behaviorHash(context) {
context.map().centerZoom([mapArgs[2], Math.min(_latitudeLimit, Math.max(-_latitudeLimit, mapArgs[1]))], mapArgs[0]);
if (q.id) {
if (q.id && mode) {
var ids = q.id.split(',').filter(function(id) {
return context.hasEntity(id);
});
var skip = mode && mode.id === 'select' && utilArrayIdentical(mode.selectedIDs(), ids);
if (ids.length && !skip) {
if (ids.length &&
(mode.id === 'browse' || (mode.id === 'select' && !utilArrayIdentical(mode.selectedIDs(), ids)))) {
context.enter(modeSelect(context, ids));
return;
}