soulwire/sketch.js

Why resize is called all the time (when setup is not a function)?

slacktracer opened this issue · 2 comments

It seems that when setup is not a function the resize event is fired every loop.
Why?
Am I missing something?
Anyway, thanks for sketch!

Thanks for spotting this. It was an issue. There's an async setup process that allows you to define methods like setup outside of the constructor, but the check was based on whether setup had been called so when it's not defined it just keeps running that check and firing resize (which is an important part of the setup). I've added an explicit check now so we should be good.

Really? So I found a "bug"... Cool.
It was really late last night and I thought I was just going crazy...
Thank you.