Closed rupl closed 8 years ago
What about just always moving the origo to the center of the screen? combined with zoom in/out function.
brilliant! can't think of a problem with that off the top of my head. I'll try it out sometime soon.
On Sunday, 6 December 2015, Afra Noubarzadeh, Afragon < notifications@github.com> wrote:
What about just always moving the origo to the center of the screen? combined with zoom in/out function.
— Reply to this email directly or view it on GitHub https://github.com/rupl/bustashape/issues/24#issuecomment-162317494.
I gave this a try and it basically just crowds the middle instead of the corner. I think the zooming feature is really the only solution. Unfortunately it's not a quickie, but still possible with #21
I have started messing with two.js and I believe that I can make zooming work unless someone makes a shape extremely large (e.g. to use as a background color)
I'll try this for short term and maybe long term we can figure out how to switch between a "shape" mode and "zooming" mode.. even when I say it I don't like the complexity, but I'll think about it and keep playing with two.js
I got this working tonight and also settled on a better UI convention than shape/zoom mode: a simple escape button. If someone zoom/pans way off into infinity, we can have a button to bring them back to where everyone else is.
This PR fixes #4
yo @afragon we can now test PRs in sandboxes! Anytime it says that the app was deployed you can click through and see how the site would behave if we merge this PR.
Here's a sandbox with the zoom/pan stuff. Does it work for you? I still only have iPhone/MacBook to test on so any quirks with Android would be good to know about.
The only problem I'm aware of currently: I still have a little bit of math to work out when moving shapes after panning the canvas. The bug shows up if you zoom and pan a bit, then move a shape. The shape will unexpectedly jump from its initial position each time you touch it.
Ok, I think I have the math sorted! Any bugs you find are news to me. So please let me know if anything seems weird when you test.
I still have a little bit of math to work out
argh, days of hacking at this and I still can't nail it... this problem makes me really regret not paying attention in precalc :frowning:
ok! this isn't perfect, but it does work 95% the way I imagined in the beginning. There's some jittery action on some phones, but in the interest of shipping I'm calling this done for now!
Phones always crowd the top left corner of the screen. These are quick solutions until a better zooming/panning mechanism is implemented.