Created
August 16, 2012 13:50
-
-
Save assertchris/3370239 to your computer and use it in GitHub Desktop.
Moofx3 Mootools Adapter (Moo/CS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| do -> | |
| animate = (property, value, options) -> | |
| moo = moofx(this) | |
| moo and moo.animate(property, value, options) | |
| return this | |
| design = (property, value) -> | |
| moo = moofx(this) | |
| moo and moo.style(property, value) | |
| return this | |
| compute = (property) -> | |
| moo = moofx(this) | |
| return moo and moo.compute(property) | |
| computeNext = (next, property) -> | |
| hasClass = @hasClass(next) | |
| @addClass(next) | |
| value = @compute(property) | |
| unless hasClass then @removeClass(next) | |
| return value | |
| Element.implement({ | |
| "design": design | |
| "animate": animate | |
| "compute": compute | |
| "computeNext": computeNext | |
| }) | |
| Elements.implement({ | |
| "design": design | |
| "animate": animate | |
| }) | |
| return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment