Skip to content

Instantly share code, notes, and snippets.

@mrpollo
Created April 20, 2011 21:19
Show Gist options
  • Save mrpollo/932884 to your computer and use it in GitHub Desktop.
Save mrpollo/932884 to your computer and use it in GitHub Desktop.
Example usage of screenutil.js
(function(d, c){
d.style.left = c.x - ( d.style.width / 2 );
d.style.top = c.y - ( d.style.height / 2 );
}( document.getElementById('test'), screenutil.getScreenCenter() ));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment