Tuesday, May 1, 2012

PANNING!!

Solved the next problem in a single day! Had one of those moments when a logic error causes visibly amusing results on screen. On first attempt, I clicked, dragged, and the circle went ZOOMING out of the screen. I was able to retrieve it and could pan it around, as long as I was EXTREMELY cautious with my movements. It was pretty immediately obvious that each movement was being compared not to the previous mouse location, but to the original mouse location, so the farther away the mouse got from its mousedown location, the more extreme the movements of the circle.

Changed my logic entirely for the next go-round and set up the circles so that they all maintained the same "offset" that they had with the mouseLoc when mouseDown occurred. Worked fine and I was able to move on and implement with an array of circle objects shortly after.

Next step will be to try to bring all of the functionalities together. MIGHT try combining just zooming and panning before trying to put it together with everything else. In the meantime, I need to work on organizing my full data set for the final deployment.