Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
672c9f04
Commit
672c9f04
authored
Aug 13, 2018
by
Mathieu Giraud
Browse files
js/numerical_axis.js: swap value_mapping fill/init
Prepares next commit.
parent
8bb8361d
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/numerical_axis.js
View file @
672c9f04
...
...
@@ -167,13 +167,16 @@ NumericalAxis.prototype = Object.create(GenericAxis.prototype);
NumericalAxis
.
prototype
.
insert_values
=
function
()
{
this
.
step_bar
=
nice_1_2_5_ceil
((
this
.
max
-
this
.
min
)
/
this
.
MAX_NB_BARS_IN_AXIS
)
// Init value_mapping
for
(
var
m
=
this
.
min
;
m
<
this
.
max
;
m
+=
this
.
step_bar
)
this
.
value_mapping
[
nice_ceil
(
m
,
this
.
step_bar
)]
=
[]
// Fill value_mapping
// Fill actual value_mapping
this
.
populateValueMapping
(
this
.
step_bar
)
this
.
sortValueMapping
()
// Fill remaining value_mapping
for
(
var
m
=
this
.
min
;
m
<
this
.
max
;
m
+=
this
.
step_bar
)
{
var
x
=
nice_ceil
(
m
,
this
.
step_bar
)
this
.
value_mapping
[
x
]
=
this
.
value_mapping
[
x
]
||
[]
}
this
.
sortValueMapping
()
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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