Show field names in wasm playground

This commit is contained in:
Max Brunsfeld 2019-07-10 14:43:05 -05:00
parent 1a33f1a665
commit 71275b34f0

View file

@ -135,7 +135,13 @@ let tree;
const start = cursor.startPosition;
const end = cursor.endPosition;
const id = cursor.nodeId;
row = `<div>${' '.repeat(indentLevel)}<a class='plain' href="#" data-id=${id} data-range="${start.row},${start.column},${end.row},${end.column}">${displayName}</a> [${start.row}, ${start.column}] - [${end.row}, ${end.column}])`;
let fieldName = cursor.currentFieldName();
if (fieldName) {
fieldName += ': ';
} else {
fieldName = '';
}
row = `<div>${' '.repeat(indentLevel)}${fieldName}<a class='plain' href="#" data-id=${id} data-range="${start.row},${start.column},${end.row},${end.column}">${displayName}</a> [${start.row}, ${start.column}] - [${end.row}, ${end.column}])`;
finishedRow = true;
}