Make the raw tags of custom map data selectable/copyable (close #6710)

This commit is contained in:
Quincy Morgan
2019-08-19 17:12:25 -05:00
parent 5aeb07f6d3
commit 0cfdd9af8d
2 changed files with 7 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ export function uiDataEditor(context) {
.state('hover')
)
.selectAll('textarea.tag-text')
.property('disabled', true)
.attr('readonly', true)
.classed('readonly', true);
}

View File

@@ -268,12 +268,16 @@ export function uiRawTagEditor(context) {
items.selectAll('input.key')
.attr('title', function(d) { return d.key; })
.call(utilGetSetValue, function(d) { return d.key; })
.property('disabled', isReadOnly);
.attr('readonly', function(d) {
return isReadOnly(d) || null;
});
items.selectAll('input.value')
.attr('title', function(d) { return d.value; })
.call(utilGetSetValue, function(d) { return d.value; })
.property('disabled', isReadOnly);
.attr('readonly', function(d) {
return isReadOnly(d) || null;
});
items.selectAll('button.remove')
.on('mousedown', removeTag); // 'click' fires too late - #5878