mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-18 14:45:12 +02:00
Don't update entity editor when it's hidden
This commit is contained in:
@@ -120,6 +120,7 @@ iD.ui.EntityEditor = function(context) {
|
||||
.entityID(id));
|
||||
|
||||
function historyChanged() {
|
||||
if (state === 'hide') return;
|
||||
var entity = context.hasEntity(id);
|
||||
if (!entity) return;
|
||||
entityEditor.preset(context.presets().match(entity, context.graph()));
|
||||
|
||||
@@ -75,6 +75,7 @@ iD.ui.Inspector = function(context) {
|
||||
inspector.state = function(_) {
|
||||
if (!arguments.length) return state;
|
||||
state = _;
|
||||
entityEditor.state(state);
|
||||
return inspector;
|
||||
};
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ iD.ui.Sidebar = function(context) {
|
||||
} else if (!current) {
|
||||
featureListWrap.classed('inspector-hidden', false);
|
||||
inspectorWrap.classed('inspector-hidden', true);
|
||||
inspector.state('hide');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,6 +49,7 @@ iD.ui.Sidebar = function(context) {
|
||||
} else if (!current) {
|
||||
featureListWrap.classed('inspector-hidden', false);
|
||||
inspectorWrap.classed('inspector-hidden', true);
|
||||
inspector.state('hide');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user