Closed MattiasBuelens closed 10 years ago
Looks great. I suppose we don’t really need the currying stuff anymore.
True, the currying for setState
could be removed without much effort.
rotateState
and rotateStates
are a bit trickier, since they both use the State
and the DOM element objects and only one of those can be the this
context. We should probably make it accept the element(s) as parameter and change the event handler binding.
Done — see d926258.
Went a bit more in depth in #47. :wink:
Refactored
State
to better handle changes._State
methods don't do external updates.State
methods wrap internal methods to trigger external updates at the end of the call.State
methods are reduced so each change can be fully handled by one singleState
call, thus only triggering updates once.This also fixes #31, since now
rotateState
triggers the correct updates.