Allow speed to be zero. Fixes #64

pull/90/head
Glen Cheney 9 years ago
parent 1c077779c4
commit 86c8d2e77a

@ -850,7 +850,8 @@ Shuffle.prototype._layoutItem = function( item, isOnlyPosition ) {
point: pos,
scale: DEFAULT_SCALE,
opacity: isOnlyPosition ? 0 : 1,
skipTransition: isOnlyPosition,
// Set styles immediately if there is no transition speed.
skipTransition: isOnlyPosition || this.speed === 0,
callfront: function() {
if ( !isOnlyPosition ) {
$item.css( 'visibility', 'visible' );
@ -1149,7 +1150,7 @@ Shuffle.prototype._processStyleQueue = function( noLayout ) {
}, this);
if ( $transitions.length > 0 && this.initialized ) {
if ( $transitions.length > 0 && this.initialized && this.speed > 0 ) {
// Set flag that shuffle is currently in motion.
this.isTransitioning = true;

File diff suppressed because one or more lines are too long

@ -856,7 +856,8 @@ Shuffle.prototype._layoutItem = function( item, isOnlyPosition ) {
point: pos,
scale: DEFAULT_SCALE,
opacity: isOnlyPosition ? 0 : 1,
skipTransition: isOnlyPosition,
// Set styles immediately if there is no transition speed.
skipTransition: isOnlyPosition || this.speed === 0,
callfront: function() {
if ( !isOnlyPosition ) {
$item.css( 'visibility', 'visible' );
@ -1155,7 +1156,7 @@ Shuffle.prototype._processStyleQueue = function( noLayout ) {
}, this);
if ( $transitions.length > 0 && this.initialized ) {
if ( $transitions.length > 0 && this.initialized && this.speed > 0 ) {
// Set flag that shuffle is currently in motion.
this.isTransitioning = true;

File diff suppressed because one or more lines are too long

@ -831,7 +831,8 @@ Shuffle.prototype._layoutItem = function( item, isOnlyPosition ) {
point: pos,
scale: DEFAULT_SCALE,
opacity: isOnlyPosition ? 0 : 1,
skipTransition: isOnlyPosition,
// Set styles immediately if there is no transition speed.
skipTransition: isOnlyPosition || this.speed === 0,
callfront: function() {
if ( !isOnlyPosition ) {
$item.css( 'visibility', 'visible' );
@ -1130,7 +1131,7 @@ Shuffle.prototype._processStyleQueue = function( noLayout ) {
}, this);
if ( $transitions.length > 0 && this.initialized ) {
if ( $transitions.length > 0 && this.initialized && this.speed > 0 ) {
// Set flag that shuffle is currently in motion.
this.isTransitioning = true;

Loading…
Cancel
Save