{"size": 1085, "ext": "js", "max_stars_repo_path": "unify/framework/source/class/unify/ui/basic/AnimatedImage.js", "max_stars_repo_name": "unify/unify", "max_stars_repo_stars_event_min_datetime": "2015-03-14T12:23:27.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-09T18:00:53.000Z", "max_issues_repo_path": "unify/framework/source/class/unify/ui/basic/AnimatedImage.js", "max_issues_repo_name": "wuwx/unify", "max_issues_repo_issues_event_min_datetime": "2016-09-29T08:00:57.000Z", "max_issues_repo_issues_event_max_datetime": "2016-09-29T08:00:57.000Z", "max_forks_repo_path": "unify/framework/source/class/unify/ui/basic/AnimatedImage.js", "max_forks_repo_name": "wuwx/unify", "max_forks_repo_forks_event_min_datetime": "2015-02-09T05:42:32.000Z", "max_forks_repo_forks_event_max_datetime": "2018-03-29T07:56:41.000Z"}
{"max_stars_count": 8, "max_issues_count": 1, "max_forks_count": 4, "avg_line_length": 24.1111111111, "max_line_length": 95, "alphanum_fraction": 0.5594470046}
/*
===============================================================================================

		Unify Project

		Homepage: unify-project.org
		License: MIT + Apache (V2)
		Copyright: 2011, Sebastian Fastner, Mainz, Germany, http://unify-training.com

===============================================================================================
*/

/**
 * EXPERIMENTAL
 */
 
core.Class("unify.ui.basic.AnimatedImage", {
	include: [unify.ui.basic.Image, unify.fx.MWidgetAnimation],
	
	construct : function(source) {
		unify.ui.basic.Image.call(this, source);
		unify.fx.MWidgetAnimation.call(this);
		
		this.setAnimateRotateDuration(1500);
		this.addListener("changeVisibility", this.__onChangeVisibility, this);
	},
	
	members : {
		/**
		 * Event handler for visibility changes
		 *
		 * @param e {Event} Change event
		 */
		__onChangeVisibility : function(e) {
			if (e.getValue() == "visible") {
				this.setAnimateRotateInfinite(true);
				this.setAnimateRotate(360);
			} else {
				this.setAnimateRotateInfinite(false);
				this.setAnimateRotate(null);
			}
		}
	}
});
