mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 06:58:32 +02:00
Don't show "Editing" on hover
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
iD.ui.EntityEditor = function(context) {
|
||||
var event = d3.dispatch('choose'),
|
||||
state = 'select',
|
||||
id,
|
||||
preset;
|
||||
|
||||
@@ -31,7 +32,9 @@ iD.ui.EntityEditor = function(context) {
|
||||
// Update
|
||||
|
||||
$header.select('h3')
|
||||
.text(t('inspector.editing_feature', {feature: preset.name()}));
|
||||
.text(state === 'select' ?
|
||||
t('inspector.editing_feature', {feature: preset.name()}) :
|
||||
preset.name());
|
||||
|
||||
$header.select('.preset-reset')
|
||||
.on('click', function() {
|
||||
@@ -142,6 +145,12 @@ iD.ui.EntityEditor = function(context) {
|
||||
}
|
||||
}
|
||||
|
||||
entityEditor.state = function(_) {
|
||||
if (!arguments.length) return state;
|
||||
state = _;
|
||||
return entityEditor;
|
||||
};
|
||||
|
||||
entityEditor.entityID = function(_) {
|
||||
if (!arguments.length) return id;
|
||||
id = _;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
iD.ui.Inspector = function(context) {
|
||||
var presetList = iD.ui.PresetList(context),
|
||||
entityEditor = iD.ui.EntityEditor(context),
|
||||
state = 'select',
|
||||
entityID,
|
||||
newFeature = false;
|
||||
|
||||
@@ -27,6 +28,7 @@ iD.ui.Inspector = function(context) {
|
||||
|
||||
var $editorPane = $wrap.select('.entity-editor-pane')
|
||||
.call(entityEditor
|
||||
.state(state)
|
||||
.entityID(entityID)
|
||||
.on('choose', showList));
|
||||
|
||||
@@ -56,6 +58,12 @@ iD.ui.Inspector = function(context) {
|
||||
selection.style('display', 'none');
|
||||
};
|
||||
|
||||
inspector.state = function(_) {
|
||||
if (!arguments.length) return state;
|
||||
state = _;
|
||||
return inspector;
|
||||
};
|
||||
|
||||
inspector.entityID = function(_) {
|
||||
if (!arguments.length) return entityID;
|
||||
entityID = _;
|
||||
|
||||
@@ -10,6 +10,7 @@ iD.ui.Sidebar = function(context) {
|
||||
wrap.classed('inspector-hidden', false)
|
||||
.classed('inspector-hover', true)
|
||||
.call(iD.ui.Inspector(context)
|
||||
.state('hover')
|
||||
.entityID(entity.id));
|
||||
} else {
|
||||
wrap.classed('inspector-hidden', true);
|
||||
@@ -21,6 +22,7 @@ iD.ui.Sidebar = function(context) {
|
||||
wrap.classed('inspector-hidden', false)
|
||||
.classed('inspector-hover', false)
|
||||
.call(iD.ui.Inspector(context)
|
||||
.state('select')
|
||||
.entityID(selection[0]));
|
||||
} else {
|
||||
wrap.classed('inspector-hidden', true);
|
||||
|
||||
Reference in New Issue
Block a user