Last active
October 13, 2015 21:57
-
-
Save webOS101/4261485 to your computer and use it in GitHub Desktop.
Improved Light
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
| <script> | |
| new Light({color: "green"}).renderInto(document.body); | |
| </script> |
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
| enyo.kind({ | |
| name: "Light", | |
| published: { | |
| "color" : "yellow" | |
| }, | |
| style: "width: 50px; height: 50px; border-radius: 50%;", | |
| create: function() { | |
| this.inherited(arguments); | |
| this.colorChanged(); | |
| }, | |
| colorChanged: function(oldValue) { | |
| this.applyStyle("background-color", this.color); | |
| } | |
| }); |
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
| name: Improved Light | |
| description: A light with changeable color | |
| authors: | |
| - Roy Sutton | |
| normalize_css: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment