Don't update entity editor when it's hidden

This commit is contained in:
John Firebaugh
2013-08-09 14:41:47 -07:00
parent a231963510
commit ef03a45d48
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -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()));
+1
View File
@@ -75,6 +75,7 @@ iD.ui.Inspector = function(context) {
inspector.state = function(_) {
if (!arguments.length) return state;
state = _;
entityEditor.state(state);
return inspector;
};
+2
View File
@@ -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');
}
};