cockpit/js/instance.js in cpee-2.1.55 vs cockpit/js/instance.js in cpee-2.1.56
- old
+ new
@@ -628,25 +628,25 @@
// extend the bars
if (pos > p.ymax) {
p.ymax = pos;
}
- inner.append($X('<text xmlns="http://www.w3.org/2000/svg">' + k + '</text>'));
+ inner.append($X('<text xmlns="http://www.w3.org/2000/svg"></text>').text(k));
tsvg.append(inner);
}
if (firstAssignFlag) {
// Additional logic and construction of another polygon for orange triangle pointing left
p.y0 -= (val.row-1) * dimensions.height;
- tsvg.append($X('<polygon xmlns="http://www.w3.org/2000/svg" points="' + (p.x + iconsize) + ',' + firstpos + ' ' + (p.x) + ',' + (firstpos + iconsize/2) + ' ' + (p.x) + ',' + (firstpos - iconsize/2) + '" class="resource-point write">' + '<text xmlns="http://www.w3.org/2000/svg">' + k + '</text></polygon>'));
+ tsvg.append($X('<polygon xmlns="http://www.w3.org/2000/svg" points="' + (p.x + iconsize) + ',' + firstpos + ' ' + (p.x) + ',' + (firstpos + iconsize/2) + ' ' + (p.x) + ',' + (firstpos - iconsize/2) + '" class="resource-point write"></polygon>').append($X('<text xmlns="http://www.w3.org/2000/svg"></text>').text(k)));
}
cx += iconsize + space;
}
tcolumnsvgs[col.column][val.row] = tsvg;
} else {
- tsvg = $X('<text x="' + space + '" y="' + (dimensions.height * val.row - dimensions.height_shift) + '" xmlns="http://www.w3.org/2000/svg">' + col.value + '</text>');
+ tsvg = $X('<text x="' + space + '" y="' + (dimensions.height * val.row - dimensions.height_shift) + '" xmlns="http://www.w3.org/2000/svg"></text>').text(col.value);
tcolumnsvgs[col.column][val.row] = tsvg;
}
tcolumncount[col.column] += 1;
}
@@ -681,12 +681,12 @@
for (var i = 0; i < max.row; i++) {
svgback.append($X('<rect xmlns="http://www.w3.org/2000/svg" element-row="' + i + '" class="stripe ' + (i % 2 == 0 ? 'even' : 'odd') + '" x="0" y="' + (dimensions.height * i + dimensions.height_shift/2) + '" width="' + (xwidth + 1) + '" height="' + dimensions.height + '"></rect>'));
svgback.append($X('<rect xmlns="http://www.w3.org/2000/svg" element-row="' + i + '" class="border" x="0" y="' + (dimensions.height * i + dimensions.height_shift/2) + '" height="' + dimensions.height + '" width="1"></rect>'));
}
}
- if (tcolumntype[h] == "resource") {
+ if (tcolumntype[h] == 'resource' || tcolumntype[h] == 'bodsod') {
for (const [k, p] of mapPoints) {
- svgback.append($X('<line xmlns="http://www.w3.org/2000/svg" x1="' + (p.x + iconsize/2) + '" y1="' + p.y0 + '" x2="' + (p.x + iconsize/2) + '" y2="' + p.ymax + '" class="resource-line" stroke-width="' + iconsize + '"><text>' + k + '</text></line>'));
+ svgback.append($X('<line xmlns="http://www.w3.org/2000/svg" x1="' + (p.x + iconsize/2) + '" y1="' + p.y0 + '" x2="' + (p.x + iconsize/2) + '" y2="' + p.ymax + '" class="' + tcolumntype[h] + '-line" stroke-width="' + iconsize + '"><text>' + k + '</text></line>'));
}
}
$('.resource-label').hide(); // Speech Bubble hide by default