a:32:{s:9:"#provides";s:19:"dojox.widget.Roller";s:9:"#resource";s:16:"widget/Roller.js";s:9:"#requires";a:1:{i:0;a:3:{i:0;s:6:"common";i:1;s:13:"dijit._Widget";i:2;s:5:"dijit";}}s:19:"dojox.widget.Roller";a:6:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:1:{i:0;s:13:"dijit._Widget";}}s:7:"summary";s:71:"A simple widget to take an unordered-list of Text and roll through them";s:11:"description";s:503:"The Roller widget takes an unordered-list of items, and converts them to a single-area (the size of one list-item, however you so choose to style it) and loops continually, fading between items. In it's current state, it requires it be created from an unordered (or ordered) list, though can contain complex markup. You can manipulate the `items` array at any point during the cycle with standard array manipulation techniques. The class "dojoxRoller" is added to the UL element for styling purposes.";s:8:"examples";a:4:{i:0;s:122:" // create a scroller from a unordered list with id="lister" var thinger = new dojox.widget.Roller.Roller({},"lister");";i:1;s:145:" // create a scroller from a fixed array, and place in the DOM: new dojox.widget.Roller({ items:["one","two","three"] }).placeAt(dojo.body());";i:2;s:72:" // add an item: dijit.byId("roller").items.push("I am a new Label");";i:3;s:63:" // stop a roller from rolling: dijit.byId("roller").stop();";}s:9:"classlike";b:1;}s:25:"dojox.widget.Roller.delay";a:3:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:7:"Integer";s:7:"summary";s:22:"Interval between rolls";}s:29:"dojox.widget.Roller.autoStart";a:3:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:7:"Boolean";s:7:"summary";s:75:"Toggle to control starup behavior. Call .start() manually if set to `false`";}s:32:"dojox.widget.Roller.itemSelector";a:3:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:6:"String";s:7:"summary";s:207:"A CSS selector to be used by `dojo.query` to find the children items in this widget. Defaults to "> li", finding only first-children list-items in the list, allowing for embedded lists to occur.";}s:30:"dojox.widget.Roller.durationIn";a:3:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:7:"Integer";s:7:"summary";s:70:"Speed (in ms) to apply to the "in" animation (show the node)";}s:31:"dojox.widget.Roller.durationOut";a:3:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:7:"Integer";s:7:"summary";s:79:"Speed (in ms) to apply to the "out" animation (hide the showing node)";}s:25:"dojox.widget.Roller.items";a:4:{s:9:"prototype";s:19:"dojox.widget.Roller";s:8:"instance";s:19:"dojox.widget.Roller";s:4:"type";s:5:"Array";s:7:"summary";s:75:"If populated prior to instantiation, is used as the Items over the children";}s:24:"dojox.widget.Roller._idx";a:5:{s:9:"prototype";s:19:"dojox.widget.Roller";s:8:"instance";s:19:"dojox.widget.Roller";s:4:"type";s:7:"Integer";s:7:"summary";s:62:"Index of the the currently visible item in the list of items[]";s:7:"private";b:1;}s:30:"dojox.widget.Roller.postCreate";a:4:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:8:"Function";s:6:"source";s:2996:"dojo.provide("dojox.widget.Roller"); dojo.require("dijit._Widget"); dojo.declare("dojox.widget.Roller", dijit._Widget, { // summary: A simple widget to take an unordered-list of Text and roll through them // // description: // The Roller widget takes an unordered-list of items, and converts // them to a single-area (the size of one list-item, however you so choose // to style it) and loops continually, fading between items. // // In it's current state, it requires it be created from an unordered (or ordered) // list, though can contain complex markup. // // You can manipulate the `items` array at any point during the cycle with // standard array manipulation techniques. // // The class "dojoxRoller" is added to the UL element for styling purposes. // // example: // | // create a scroller from a unordered list with id="lister" // | var thinger = new dojox.widget.Roller.Roller({},"lister"); // // example: // | // create a scroller from a fixed array, and place in the DOM: // | new dojox.widget.Roller({ items:["one","two","three"] }).placeAt(dojo.body()); // // example: // | // add an item: // | dijit.byId("roller").items.push("I am a new Label"); // // example: // | // stop a roller from rolling: // | dijit.byId("roller").stop(); // // delay: Integer // Interval between rolls delay: 2000, // autoStart: Boolean // Toggle to control starup behavior. Call .start() manually // if set to `false` autoStart: true, // itemSelector: String // A CSS selector to be used by `dojo.query` to find the children // items in this widget. Defaults to "> li", finding only first-children // list-items in the list, allowing for embedded lists to occur. itemSelector: "> li", // durationIn: Integer // Speed (in ms) to apply to the "in" animation (show the node) durationIn: 400, // durationOut: Integer // Speed (in ms) to apply to the "out" animation (hide the showing node) durationOut: 275, // items: Array // If populated prior to instantiation, is used as the Items over the children items: [], // _idx: Integer // Index of the the currently visible item in the list of items[] _idx: -1, postCreate: function(){ // add some instance vars: if(!this["items"]){ this.items = []; } dojo.addClass(this.domNode,"dojoxRoller"); // find all the items in this list, and popuplate dojo.query(this.itemSelector, this.domNode).forEach(function(item, i){ this.items.push(item.innerHTML); // reuse the first match, destroy the rest if(i == 0){ this._roller = item; this._idx = 0; }else{ dojo.destroy(item); } }, this); // handle the case where items[] were passed, and no srcNodeRef exists if(!this._roller){ this._roller = dojo.create('li', null, this.domNode); } // stub out animation creation (for overloading maybe later) this.makeAnims(); // and start, if true: if(this.autoStart){ this.start(); }";s:7:"summary";s:0:"";}s:29:"dojox.widget.Roller.makeAnims";a:4:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:8:"Function";s:6:"source";s:218:" var n = this.domNode; dojo.mixin(this, { _anim: { "in": dojo.fadeIn({ node:n, duration: this.durationIn }), "out": dojo.fadeOut({ node:n, duration: this.durationOut }) } }); this._setupConnects();";s:7:"summary";s:136:"Animation creator function. Need to create an 'in' and 'out' _Animation stored in _anim Object, which the rest of the widget will reuse.";}s:34:"dojox.widget.Roller._setupConnects";a:5:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:8:"Function";s:6:"source";s:415:" var anim = this._anim; this.connect(anim["out"], "onEnd", function(){ // onEnd of the `out` animation, select the next items and play `in` animation this._set(this._idx + 1); anim["in"].play(15); }); this.connect(anim["in"], "onEnd", function(){ // onEnd of the `in` animation, call `start` again after some delay: this._timeout = setTimeout(dojo.hitch(this, "_run"), this.delay); });";s:7:"summary";s:31:"setup the loop connection logic";s:7:"private";b:1;}s:25:"dojox.widget.Roller.start";a:4:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:8:"Function";s:6:"source";s:64:" if(!this.rolling){ this.rolling = true; this._run(); }";s:7:"summary";s:24:"Starts to Roller looping";}s:24:"dojox.widget.Roller._run";a:5:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:8:"Function";s:6:"source";s:41:" this._anim["out"].gotoPercent(0, true);";s:7:"private";b:1;s:7:"summary";s:0:"";}s:24:"dojox.widget.Roller.stop";a:4:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:8:"Function";s:6:"source";s:137:" this.rolling = false; var m = this._anim, t = this._timeout; if(t){ clearTimeout(t); } m["in"].stop(); m["out"].stop();";s:7:"summary";s:38:"Stops the Roller from looping anymore.";}s:24:"dojox.widget.Roller._set";a:6:{s:9:"prototype";s:19:"dojox.widget.Roller";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"i";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:147:" var l = this.items.length - 1; if(i < 0){ i = l; } if(i > l){ i = 0; } this._roller.innerHTML = this.items[i] || "error!"; this._idx = i;";s:7:"summary";s:66:"Set the Roller to some passed index. If beyond range, go to first.";s:7:"private";b:1;}s:27:"dojox.widget.Roller._roller";a:3:{s:8:"instance";s:19:"dojox.widget.Roller";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojox.widget.Roller._timeout";a:3:{s:8:"instance";s:19:"dojox.widget.Roller";s:7:"private";b:1;s:7:"summary";s:0:"";}s:27:"dojox.widget.Roller.rolling";a:2:{s:8:"instance";s:19:"dojox.widget.Roller";s:7:"summary";s:0:"";}s:37:"dojox.widget.Roller._roller.innerHTML";a:3:{s:8:"instance";s:19:"dojox.widget.Roller";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:24:"dojox.widget.RollerSlide";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:19:"dojox.widget.Roller";}s:4:"call";a:1:{i:0;s:19:"dojox.widget.Roller";}}s:7:"summary";s:144:"An add-on to the Roller to modify animations. This produces a slide-from-bottom like effect. See `dojox.widget.Roller` for full API information.";s:9:"classlike";b:1;}s:36:"dojox.widget.RollerSlide.durationOut";a:2:{s:9:"prototype";s:24:"dojox.widget.RollerSlide";s:7:"summary";s:0:"";}s:34:"dojox.widget.RollerSlide.makeAnims";a:4:{s:9:"prototype";s:24:"dojox.widget.RollerSlide";s:4:"type";s:8:"Function";s:6:"source";s:520:" var n = this.domNode, pos = "position", props = { top: { end: 0, start: 25 }, opacity: 1 } ; dojo.style(n, pos, "relative"); dojo.style(this._roller, pos, "absolute"); dojo.mixin(this, { _anim: { "in": dojo.animateProperty({ node: n, duration: this.durationIn, properties: props }), "out": dojo.fadeOut({ node: n, duration: this.durationOut }) } }); // don't forget to do this in the class. override if necessary. this._setupConnects();";s:7:"summary";s:136:"Animation creator function. Need to create an 'in' and 'out' _Animation stored in _anim Object, which the rest of the widget will reuse.";}s:25:"dojox.widget._RollerHover";a:5:{s:4:"type";s:8:"Function";s:7:"summary";s:87:"A mixin class to provide a way to automate the "stop on hover" functionality.";s:11:"description";s:506:"A mixin class used to provide a way to automate a "stop on hover" behavior, while still allowing for ambigious subclassing for custom animations. Simply mix this class into a `dojox.widget.Roller` variant, and instantiate as you would. The hover connection is done automatically. The "hover" functionality is as such: Stop rotation while the mouse is over the instance, and resume again once leaving. Even if autoStart is disabled, the widget will start if a mouse enters and leaves the node in this case.";s:8:"examples";a:1:{i:0;s:118:" dojo.declare("my.Roller", [dojox.widget.RollerSlide, dojox.widget._RollerHover], {}); new my.Roller({}, "myList");";}s:9:"classlike";b:1;}s:36:"dojox.widget._RollerHover.postCreate";a:4:{s:9:"prototype";s:25:"dojox.widget._RollerHover";s:4:"type";s:8:"Function";s:6:"source";s:137:" this.inherited(arguments); this.connect(this.domNode, "onmouseenter", "stop"); this.connect(this.domNode, "onmouseleave", "start");";s:7:"summary";s:0:"";}s:10:"this._anim";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:13:"this._anim.in";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:14:"this._anim.out";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:12:"dojox.widget";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}