thestandardtoaster/html5-physics — pull request #9 by jdloft (2014-10-25 00:58:15+00:00)
Title: Fix for slider not updated

Fix for bug #8 where the gravity gets reset after a hover over a gravity range. I removed the old gravity function (which was replaced by the new setGravity function) and changed setGravity to update the ranges. The type argument ensures that unnecessary updating doesn't occur. This causes problems during my test where a slider would rapidly loop updating with itself. setGravity should have use this.type for the third argument so that the function performs properly. Any other uses don't have to provide an argument if they don't require updating of the label and ranges (such as user controlling the active object).