Restore code to set state=hover (not sure if actually needed)

Also, fix hover style for textarea
This commit is contained in:
Bryan Housel
2017-08-03 13:32:08 -04:00
parent 6950220ced
commit 216a04d962
3 changed files with 16 additions and 6 deletions

View File

@@ -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;
}

View File

@@ -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 = _;

View File

@@ -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(); }),