We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cf82b0 commit 23bec4bCopy full SHA for 23bec4b
test/ui-helper.js
@@ -241,7 +241,16 @@ function createFancyTree(parent, fileobj) {
241
fancytree_options.renderTitle = function(event, data) {
242
var box = data.node.data.box;
243
var el = "<span class='fancytree-title'>";
244
- el += box.type + ' ';
+ var title = box.type;
245
+ if (!title) {
246
+ // Find index in parent.
247
+ var siblings = data.node.parent.children;
248
+ for (var idx = 0; idx < siblings.length; idx++) {
249
+ if (siblings[idx] == data.node) break;
250
+ }
251
+ title = idx;
252
253
+ el += title + ' ';
254
if (box.box_name)
255
el += "<span class='boxname'>(" + box.box_name + ")</span>";
256
el += "</span>";
0 commit comments