diff options
author | Lionel LASKE <llaske@c2s.fr> | 2012-09-18 19:16:20 (GMT) |
---|---|---|
committer | Lionel LASKE <llaske@c2s.fr> | 2012-09-18 19:16:20 (GMT) |
commit | 816de0918c28461cc2d1e3457348fd5b6e11950f (patch) | |
tree | 667959b6e32d998a5bf4ae927ea59d88b71bfd44 /html/lib/onyx/source/Spinner.js |
Initial version
Diffstat (limited to 'html/lib/onyx/source/Spinner.js')
-rw-r--r-- | html/lib/onyx/source/Spinner.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/html/lib/onyx/source/Spinner.js b/html/lib/onyx/source/Spinner.js new file mode 100644 index 0000000..3bb923e --- /dev/null +++ b/html/lib/onyx/source/Spinner.js @@ -0,0 +1,31 @@ +/** + A control that displays a spinner animation to indicate that activity is + taking place. By default, onyx.Spinner will display a light spinner, + suitable for displaying against a dark background. To render a dark spinner + to be shown on a lighter background, add the "onyx-light" class to the + spinner: + + {kind: "onyx.Spinner", classes: "onyx-light"} + + Typically, a spinner is shown to indicate activity and hidden to indicate + that the activity has ended. The spinner animation will automatically start + when a spinner is shown. If you wish, you may control the animation directly + by calling the *start*, *stop*, and *toggle* methods. +*/ +enyo.kind({ + name: "onyx.Spinner", + classes: "onyx-spinner", + //* @public + //* Stops the spinner animation. + stop: function() { + this.setShowing(false); + }, + //* Starts the spinner animation. + start: function() { + this.setShowing(true); + }, + //* Toggles the spinner animation on or off. + toggle: function() { + this.setShowing(!this.getShowing()); + } +}); |