mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Restore code to set state=hover (not sure if actually needed)
Also, fix hover style for textarea
This commit is contained in:
@@ -1146,6 +1146,7 @@ button.save.has-count .count::before {
|
||||
.inspector-hover .form-field-multicombo,
|
||||
.inspector-hover .structure-extras-wrap,
|
||||
.inspector-hover input,
|
||||
.inspector-hover textarea,
|
||||
.inspector-hover label {
|
||||
background: #ececec;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ import { utilRebind } from '../util';
|
||||
export function uiField(context, presetField, entity, show) {
|
||||
var dispatch = d3.dispatch('change'),
|
||||
field = _.clone(presetField),
|
||||
tags;
|
||||
state = '',
|
||||
tags = {};
|
||||
|
||||
|
||||
field.impl = uiFields[field.type](field, context)
|
||||
@@ -123,10 +124,9 @@ export function uiField(context, presetField, entity, show) {
|
||||
}
|
||||
var reference = uiTagReference(d.reference || { key: referenceKey }, context);
|
||||
|
||||
//FIXME
|
||||
// if (state === 'hover') {
|
||||
// reference.showing(false);
|
||||
// }
|
||||
if (state === 'hover') {
|
||||
reference.showing(false);
|
||||
}
|
||||
|
||||
d3.select(this)
|
||||
.call(d.impl);
|
||||
@@ -141,6 +141,13 @@ export function uiField(context, presetField, entity, show) {
|
||||
};
|
||||
|
||||
|
||||
field.state = function(_) {
|
||||
if (!arguments.length) return state;
|
||||
state = _;
|
||||
return field;
|
||||
};
|
||||
|
||||
|
||||
field.tags = function(_) {
|
||||
if (!arguments.length) return tags;
|
||||
tags = _;
|
||||
|
||||
@@ -75,7 +75,9 @@ export function uiPresetEditor(context) {
|
||||
}
|
||||
|
||||
fieldsArr.forEach(function(field) {
|
||||
field.tags(tags);
|
||||
field
|
||||
.state(state)
|
||||
.tags(tags);
|
||||
});
|
||||
|
||||
var shown = fieldsArr.filter(function(field) { return field.isShown(); }),
|
||||
|
||||
Reference in New Issue
Block a user