Skip to content

Commit

Permalink
Resize: Fixed event triggering (fixes #3637)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Jackson authored and Paul Jackson committed Nov 18, 2013
1 parent b62fb73 commit 75716a5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/plugins/resize/resize.js
Expand Up @@ -110,7 +110,7 @@ var id = "wb-resize",
// Check for a viewport or text size change
for ( i = 0; i !== len; i += 1 ) {
if ( currentSizes[ i ] !== sizes[ i ] ) {

// Change detected so trigger related event
$document.trigger( events[ i ], currentSizes );

Expand All @@ -120,16 +120,15 @@ var id = "wb-resize",
}
sizes = currentSizes;
return;
} else {

// Initialize the handler resources
init();
}
};

// Re-test on each timerpoke
$document.on( "timerpoke.wb", selector, test );

// Initialize the resources
init();

// Add the timer poke to initialize the plugin
window._timer.add( selector );

Expand Down

0 comments on commit 75716a5

Please sign in to comment.