Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
4d9c44f4
Commit
4d9c44f4
authored
May 30, 2017
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
browser/js/list.js
View file @
4d9c44f4
...
@@ -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
...
...
browser/js/segmenter.js
View file @
4d9c44f4
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment