rupl / bustashape

Collaborative, real-time artboards
https://bustashape.art
MIT License
5 stars 3 forks source link

New shapes should be relative to current state of canvas #32

Closed rupl closed 8 years ago

rupl commented 8 years ago

I noticed as I tested #24 that after zooming out a few times and making progressively bigger shapes, the new ones were too tiny to grab with two fingers to scale up. The new shapes should always be roughly the same size on your screen, and perhaps they should always appear in the top-left corner.

I think this is as simple as checking canvas scale/translation when creating new shape, and offsetting by those amounts. But I've been known to oversimplify math before :grin:

rupl commented 8 years ago

yes. I did indeed underestimate the amount of math needed to make this work the way I want.

no.. I just overthought it for about two days straight 😁

rupl commented 8 years ago

I set a zoom limit because after getting relatively sized shapes working, I frequently "fell off" the canvas, which we see folks doing frequently when they zoom out so far (approx 1/1000x) the rounding errors cause everything to disappear. The limit is at 1000 because it seems to be the threshold where things disappear.

rupl commented 8 years ago

awww yeah, this works great on my end. @afragon could you try going to https://bustashape-pr-32.herokuapp.com/ and tell me what you think?

afragon commented 8 years ago

Works perfect!!! Good job! Love the effect!!