Regarding canvas dragging after zooming of campus with ScaleDetector extension

19 views
Skip to first unread message

ayushi agarwal

unread,
Jun 15, 2017, 3:37:41 AM6/15/17
to MIT App Inventor Forum
Hello, 


I am trying to plot a graph with Canvas.DrawLines on canvas in MIT app inventor. I used an extension ScaleDetector for pinch zoom in and zoom out. Now, after zoom in , since the size of the canvas exceeds the display size , so I need to have drag support to it. Since canvas doesn't have Canvas.X and Canvas.Y functions so that i can use it in Canvas.Dragged . how can I arrange the canvas so that after zoom in, the user can drag or slide to see the whole graph. Somebody please help me with this.

Evan Patton

unread,
Jun 15, 2017, 7:52:29 PM6/15/17
to MIT App Inventor Forum
Hi Ayushi,

How are you handling the zoom in the Canvas? Are you changing the size of image sprites? If you want to pan, you'd likely have to move the image sprites accordingly. However, I'm not sure that sprites can have negative coordinates so you may run into issues there.

There is also a Chart extension written by two students at Mills College. You may want to try it out. They have given us a sample AIA and the extension that may be useful to you.

Evan
Reply all
Reply to author
Forward
0 new messages