soulwire / sketch.js

Cross-Platform JavaScript Creative Coding Framework
MIT License
4.09k stars 430 forks source link

Closing issue #23 and adding 'autoresize' parameter. #24

Closed rafaelrinaldi closed 11 years ago

rafaelrinaldi commented 11 years ago

I've closed the issue #23 and I've also added 'autoresize' parameter which makes possible to resize only if you want to (it's 'true' by default).

I've tested all the examples with different settings and they've worked well. There are comments where I've changed things.

I've also updated the minified file by using yuglify compressor.

soulwire commented 11 years ago

Thanks Rafael

molefrog commented 11 years ago

Hi! The problem is that now 'autoresize' is set to false, even if you're not using custom canvas (you can see it in demos). UPD: That's why: defaults.autosize should be defaults.autoresize

// Only binds window resize if `autoresize` is set to `true`
if( defaults.autosize ) bind( window, 'resize', resize );
rafaelrinaldi commented 11 years ago

I'm not sure of what you expect. autoresize is an option and you can set it to true or false depending on what you want to accomplish.

molefrog commented 11 years ago

I mean resize doesn't work because of the bug above: defaults.autosize should be defaults.autoREsize.

rafaelrinaldi commented 11 years ago

Do you mind to add me on Skype so I can understand it better? My Skype id is rafaelrinaldi

rafaelrinaldi commented 11 years ago

I think I get it now! The parameter name is wrong. You're right! I'm going to fix this now.

Thanks for the heads up.

soulwire commented 11 years ago

Thanks for the discussion guys. @rafaelrinaldi I'm about to commit the fix - there's still some issues with resizing after changing the parameter name though so I'm tidying that up now.

rafaelrinaldi commented 11 years ago

Alright @soulwire! I was about to make a pull request on it but I will let you do it then. Which other issues have you experienced after the change? I'm curious because it's working quite well for me.

soulwire commented 11 years ago

@rafaelrinaldi cool - if you've fixed it already and not experiencing any other issues then go ahead and put in the pull request and I'll merge it in

molefrog commented 11 years ago

Hi Justin! Can you also merge new master branch into gh-pages, to make demos work properly?

soulwire commented 11 years ago

Done - it should all be working now