Skip to content

Commit

Permalink
Fixed autoresize typo and bug soulwire#24
Browse files Browse the repository at this point in the history
  • Loading branch information
soulwire committed Feb 24, 2013
1 parent d4fb0dc commit eaae692
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions js/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,7 @@ var Sketch = (function() {

bind( document, 'keydown', keydown );
bind( document, 'keyup', keyup );

// Only binds window resize if `autoresize` is set to `true`
if( defaults.autosize ) bind( window, 'resize', resize );
bind( window, 'resize', resize );
}

// ----------------------------------------
Expand Down Expand Up @@ -670,6 +668,8 @@ var Sketch = (function() {

function resize( event ) {

if ( !ctx.autoresize ) return;

var target = ctx.type === DOM ? ctx.style : ctx.canvas;

if ( ctx.fullscreen ) {
Expand Down
2 changes: 1 addition & 1 deletion js/sketch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit eaae692

Please sign in to comment.