mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Merge pull request #52 from jsmouret/master
Fix mouse drag setting the value to NaN if the initial value is negative.
This commit is contained in:
commit
96e8bc065a
@ -46,7 +46,7 @@ define([
|
|||||||
this.__impliedStep = 1; // What are we, psychics?
|
this.__impliedStep = 1; // What are we, psychics?
|
||||||
} else {
|
} else {
|
||||||
// Hey Doug, check this out.
|
// Hey Doug, check this out.
|
||||||
this.__impliedStep = Math.pow(10, Math.floor(Math.log(this.initialValue)/Math.LN10))/10;
|
this.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(this.initialValue))/Math.LN10))/10;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user