Commit 672c9f04 authored by Mathieu Giraud's avatar Mathieu Giraud

js/numerical_axis.js: swap value_mapping fill/init

Prepares next commit.
parent 8bb8361d
......@@ -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()
}
......
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