diff --git a/css/80_app.css b/css/80_app.css index db173441d..5fc74cd97 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -2480,6 +2480,7 @@ button.raw-tag-option svg.icon { flex: 1 1 50%; } +.tag-text.readonly, .tag-row.readonly, .tag-row.readonly input.key, .tag-row.readonly input.value, @@ -2945,8 +2946,8 @@ input.key-trap { border-radius: 5px 0 0 5px; } -/* tag editor - no buttons */ -.data-editor.raw-tag-editor button { +/* custom data editor - no info/delete buttons */ +.data-editor.raw-tag-editor .tag-row button { display: none; } .data-editor.raw-tag-editor .tag-row .key-wrap, diff --git a/modules/ui/data_editor.js b/modules/ui/data_editor.js index 7bf69e7ae..fc8eb3f20 100644 --- a/modules/ui/data_editor.js +++ b/modules/ui/data_editor.js @@ -60,6 +60,7 @@ export function uiDataEditor(context) { var editor = body.selectAll('.data-editor') .data([0]); + // enter/update editor.enter() .append('div') .attr('class', 'modal-section data-editor') @@ -70,6 +71,7 @@ export function uiDataEditor(context) { var rte = body.selectAll('.raw-tag-editor') .data([0]); + // enter/update rte.enter() .append('div') .attr('class', 'raw-tag-editor inspector-inner data-editor') @@ -79,7 +81,10 @@ export function uiDataEditor(context) { .readOnlyTags([/./]) .tags((_datum && _datum.properties) || {}) .state('hover') - ); + ) + .selectAll('textarea.tag-text') + .property('disabled', true) + .classed('readonly', true); }