index.js
function ToggleAnimation(target, animation) {
	var preset = {
		hide: {
			hide: 'hide',
			focus: 'show',
			restore: 'show',
			blur: 'hide'
		},
		scale: {
			hide: 'minimize',
			focus: 'focus',
			restore: 'restore',
		}
	};

	this._preset = preset[animation];
	this._target = target;

	if (!this._target) {
		throw new Error('Invalid BrowserWindow instance');
	} else if (!this._preset) {
		throw new Error('Unknown type of animation for toggle');
	}
}
function ToggleAnimation(target, animation) {
	var preset = {
		hide: {
			hide: 'hide',
			focus: 'show',
			restore: 'show',
			blur: 'hide'
		},
		scale: {
			hide: 'minimize',
			focus: 'focus',
			restore: 'restore',
		}
	};

	this._preset = preset[animation];
	this._target = target;

	if (!this._target) {
		throw new Error('Invalid BrowserWindow instance');
	} else if (!this._preset) {
		throw new Error('Unknown type of animation for toggle');
	}
}
function ToggleAnimation ( target , animation ) { var preset = { hide : { hide : 'hide' , focus : 'show' , restore : 'show' , blur : 'hide' } , scale : { hide : 'minimize' , focus : 'focus' , restore : 'restore' , } } ; this . _preset = preset [ animation ] ; this . _target = target ; if ( ! this . _target ) { throw new Error ( 'Invalid BrowserWindow instance' ) ; } else if ( ! this . _preset ) { throw new Error ( 'Unknown type of animation for toggle' ) ; } }
Delegate function for animation of window set toggle
Delegate function for animation of window set toggle