Created
October 15, 2012 12:51
-
-
Save henricavalcante/3892299 to your computer and use it in GitHub Desktop.
spritely correction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spStop: function(bool) { | |
$(this).each(function() { | |
var el_id = $(this).attr('id'); | |
//modificação para evitar erros de stop | |
if($._spritely.instances[el_id] && $._spritely.instances[el_id]['options']) | |
{ | |
if ($._spritely.instances[el_id]['options']['fps']) { | |
$._spritely.instances[el_id]['_last_fps'] = $._spritely.instances[el_id]['options']['fps']; | |
} | |
$._spritely.instances[el_id]['_stopped'] = true; | |
$._spritely.instances[el_id]['_stopped_f1'] = bool; | |
if ($._spritely.instances[el_id]['type'] == 'sprite') { | |
$(this).spSet('fps', 0); | |
} | |
if (bool) { | |
// set background image position to 0 | |
var bp_top = $._spritely.getBgY($(this)); | |
$(this).css('background-position', '0 ' + bp_top); | |
} | |
} | |
}); | |
return this; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment