You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce:
1. Add a new control with a range -1 to 1
2. Set the property value it binds to as a negative number (i.e. -0.55)
What's happening:
The range will be in increments of 1 between -1 and 1 but should be a floating
point increment between that range. It will also show the current value as -1.
How to fix:
Sorry, just thought it was easier to provide the fix as it's a one liner and
easier for the owners to add rather than me cloning the repo :)
Basically in the NumberController there is a line to init the impliedStep that
looks like this:
this.__impliedStep = Math.pow(10,
Math.floor(Math.log(this.initialValue)/Math.LN10))/10;
but should be this (to correctly account for the log of a negative number:
this.__impliedStep = Math.abs(Math.pow(10,
Math.floor(Math.log(Math.abs(this.initialValue)) / Math.LN10)) / 10);
This change is working well for me and hope it helps in some small way :)
Thanks for the library too!
Original issue reported on code.google.com by [email protected] on 14 Aug 2014 at 11:25
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 14 Aug 2014 at 11:25The text was updated successfully, but these errors were encountered: