Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/html/lib/onyx/source/Spinner.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/lib/onyx/source/Spinner.js')
-rw-r--r--html/lib/onyx/source/Spinner.js31
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());
+ }
+});