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
c9b6ae40
Commit
c9b6ae40
authored
Mar 06, 2015
by
Mathieu Giraud
Browse files
js/axis.ps: .posBarLabel(), get position of a label
parent
737643fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/axis.js
View file @
c9b6ae40
...
...
@@ -223,14 +223,16 @@ Axis.prototype = {
var
i
=
1
for
(
var
e
in
tab
){
if
(
i
%
step
==
0
){
var
pos
=
(
i
-
0.5
)
/
length
;
var
pos
=
this
.
posBarLabel
(
i
,
length
)
if
(
this
.
reverse
)
pos
=
1
-
pos
;
this
.
labels
.
push
(
this
.
label
(
"
line
"
,
pos
,
e
));
}
i
++
;
}
}
},
posBarLabel
:
function
(
i
,
length
)
{
return
(
i
-
0.5
)
/
length
;
}
}
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