Skip to content

Instantly share code, notes, and snippets.

@camoconnell
Created June 11, 2013 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camoconnell/5755437 to your computer and use it in GitHub Desktop.
Save camoconnell/5755437 to your computer and use it in GitHub Desktop.
Require js issue
/*
* Utilies / Resize
* - - - - - - - - - - - - - -
*/
define([],function () {
var resizeItems = [],
update = function () {
App.screen.height = App.el.win.height();
App.screen.width = App.el.win.width();
for (i = 0; i < resizeItems.length; i++){
var item = resizeItems[i];
item.callback( App.screen.width , App.screen.height );
}
};
return {
update : update,
add : function( item ) { resizeItems.push( item ); }
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment