dist/jquery.fancytree-all-deps.js
function(opts) {
			var i,
				that = this,
				deferreds = [],
				dfd = new $.Deferred(),
				parents = this.getParentList(false, false),
				len = parents.length,
				effects = !(opts && opts.noAnimation === true),
				scroll = !(opts && opts.scrollIntoView === false);

			// Expand bottom-up, so only the top node is animated
			for (i = len - 1; i >= 0; i--) {
				// that.debug("pushexpand" + parents[i]);
				deferreds.push(parents[i].setExpanded(true, opts));
			}
			$.when.apply($, deferreds).done(function() {
				// All expands have finished
				// that.debug("expand DONE", scroll);
				if (scroll) {
					that.scrollIntoView(effects).done(function() {
						// that.debug("scroll DONE");
						dfd.resolve();
					});
				} else {
					dfd.resolve();
				}
			});
			return dfd.promise();
		}
function(opts) {
			var i,
				that = this,
				deferreds = [],
				dfd = new $.Deferred(),
				parents = this.getParentList(false, false),
				len = parents.length,
				effects = !(opts && opts.noAnimation === true),
				scroll = !(opts && opts.scrollIntoView === false);

			// Expand bottom-up, so only the top node is animated
			for (i = len - 1; i >= 0; i--) {
				// that.debug("pushexpand" + parents[i]);
				deferreds.push(parents[i].setExpanded(true, opts));
			}
			$.when.apply($, deferreds).done(function() {
				// All expands have finished
				// that.debug("expand DONE", scroll);
				if (scroll) {
					that.scrollIntoView(effects).done(function() {
						// that.debug("scroll DONE");
						dfd.resolve();
					});
				} else {
					dfd.resolve();
				}
			});
			return dfd.promise();
		}
function ( opts ) { var i , that = this , deferreds = [ ] , dfd = new $ . Deferred ( ) , parents = this . getParentList ( false , false ) , len = parents . length , effects = ! ( opts && opts . noAnimation === true ) , scroll = ! ( opts && opts . scrollIntoView === false ) ; // Expand bottom-up, so only the top node is animated for ( i = len - 1 ; i >= 0 ; i -- ) { // that.debug("pushexpand" + parents[i]); deferreds . push ( parents [ i ] . setExpanded ( true , opts ) ) ; } $ . when . apply ( $ , deferreds ) . done ( function ( ) { // All expands have finished // that.debug("expand DONE", scroll); if ( scroll ) { that . scrollIntoView ( effects ) . done ( function ( ) { // that.debug("scroll DONE"); dfd . resolve ( ) ; } ) ; } else { dfd . resolve ( ) ; } } ) ; return dfd . promise ( ) ; }
Expand all parents and optionally scroll into visible area as neccessary.
Promise is resolved, when lazy loading and animations are done.
@param {object} [opts] passed to `setExpanded()`.
Defaults to {noAnimation: false, noEvents: false, scrollIntoView: true}
@returns {$.Promise}
Expand all parents and optionally scroll into visible area as neccessary . Promise is resolved when lazy loading and animations are done .