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
Function correctRounding is defined inside the HSlider constructor, so every instance has a copy of this function. If you add one more parameter (the value of valueProperty.value), then this function could be moved outside the constructor (private to the file, not in the inherit call), and 1 copy of the function will be shared by all instances.
Recommended signature:
function correctRounding( newValue, currentValue, stepSize )
Thanks @pixelzoom, I changed the signature to what you recommended in the ticket. I also moved the function out of constructor so it is shared, and moved it after sun.register call. But for #326 it is no longer in HSlider and in a trait called AccessibleSlider. AccessibleSlider is going to be reviewed in that issue. Closing this one.
Function
correctRounding
is defined inside theHSlider
constructor, so every instance has a copy of this function. If you add one more parameter (the value of valueProperty.value), then this function could be moved outside the constructor (private to the file, not in theinherit
call), and 1 copy of the function will be shared by all instances.Recommended signature:
function correctRounding( newValue, currentValue, stepSize )
Example usage on line 375:
newValue = correctRounding( newValue, valueProperty.get(), stepSize )
The text was updated successfully, but these errors were encountered: