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
6b5e045b
Commit
6b5e045b
authored
Aug 09, 2018
by
Mathieu Giraud
Browse files
js/tools.js: when min == max, keep one step
parent
40dbbbaa
Changes
1
Show whitespace changes
Inline
Side-by-side
browser/js/tools.js
View file @
6b5e045b
...
...
@@ -370,7 +370,11 @@ function nice_floor(x, force_pow10)
function
nice_min_max_steps
(
min
,
max
,
nb_max_steps
)
{
if
(
min
==
max
)
return
{
min
:
min
,
max
:
max
,
step
:
0
,
nb_steps
:
0
}
{
min
=
nice_floor
(
min
)
max
=
nice_ceil
(
max
+
1
)
nb_max_steps
=
1
}
var
basic_step
=
nice_1_2_5_ceil
((
max
-
min
)
/
nb_max_steps
)
...
...
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