dist/jcanvas.js
function complete($canvas, data, layer) {

		return function () {

			_showProps(layer);
			_removeSubPropAliases(layer);

			// Prevent multiple redraw loops
			if (!data.animating || data.animated === layer) {
				// Redraw layers on last frame
				$canvas.drawLayers();
			}

			// Signify the end of an animation loop
			layer._animating = false;
			data.animating = false;
			data.animated = null;

			// If callback is defined
			if (args[4]) {
				// Run callback at the end of the animation
				args[4].call($canvas[0], layer);
			}

			_triggerLayerEvent($canvas, data, layer, 'animateend');

		};

	}
function complete($canvas, data, layer) {

		return function () {

			_showProps(layer);
			_removeSubPropAliases(layer);

			// Prevent multiple redraw loops
			if (!data.animating || data.animated === layer) {
				// Redraw layers on last frame
				$canvas.drawLayers();
			}

			// Signify the end of an animation loop
			layer._animating = false;
			data.animating = false;
			data.animated = null;

			// If callback is defined
			if (args[4]) {
				// Run callback at the end of the animation
				args[4].call($canvas[0], layer);
			}

			_triggerLayerEvent($canvas, data, layer, 'animateend');

		};

	}
function complete ( $canvas , data , layer ) { return function ( ) { _showProps ( layer ) ; _removeSubPropAliases ( layer ) ; // Prevent multiple redraw loops if ( ! data . animating || data . animated === layer ) { // Redraw layers on last frame $canvas . drawLayers ( ) ; } // Signify the end of an animation loop layer . _animating = false ; data . animating = false ; data . animated = null ; // If callback is defined if ( args [ 4 ] ) { // Run callback at the end of the animation args [ 4 ] . call ( $canvas [ 0 ] , layer ) ; } _triggerLayerEvent ( $canvas , data , layer , 'animateend' ) ; } ; }
Run callback function when animation completes
Run callback function when animation completes