Commit 4d9c44f4 authored by Téo Vasseur's avatar Téo Vasseur
Browse files

{list,segmenter}.js : use DOM instead of innerHTML (for pretty)

See #2436
parent b1caf705
Pipeline #2825 failed with stages
in 2 minutes and 27 seconds
...@@ -492,7 +492,8 @@ List.prototype = { ...@@ -492,7 +492,8 @@ List.prototype = {
//update clone axis //update clone axis
var span_axis = div_elem.getElementsByClassName("axisBox")[0]; var span_axis = div_elem.getElementsByClassName("axisBox")[0];
span_axis.style.color = clone.getColor(); span_axis.style.color = clone.getColor();
span_axis.innerHTML = this.selectedAxis.pretty ? this.selectedAxis.pretty(this.selectedAxis.fct(clone)) : this.selectedAxis.fct(clone); var axis = this.selectedAxis;
span_axis.appendChild(axis.pretty ? axis.pretty(axis.fct(clone)) : document.createTextNode(axis.fct(clone)));
// span_axis.setAttribute('title', clone.getPrintableSize()); // span_axis.setAttribute('title', clone.getPrintableSize());
//update cluster icon //update cluster icon
......
...@@ -627,7 +627,7 @@ Segment.prototype = { ...@@ -627,7 +627,7 @@ Segment.prototype = {
for (var i in this.selectedAxis) { for (var i in this.selectedAxis) {
var span = document.createElement('span'); var span = document.createElement('span');
var axis = this.selectedAxis[i]; var axis = this.selectedAxis[i];
span.innerHTML = axis.pretty ? axis.pretty(axis.fct(clone)) : axis.fct(clone); span.appendChild(axis.pretty ? axis.pretty(axis.fct(clone)) : document.createTextNode(axis.fct(clone)));
span.setAttribute('title', this.selectedAxis[i].label); span.setAttribute('title', this.selectedAxis[i].label);
span.className = axOpts[i]; span.className = axOpts[i];
axisBox.appendChild(span); axisBox.appendChild(span);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment