"googlemaps" drag and drop html5 canvas

I have a large html5 canvas (much larger than the screen) and I want to implement the google-maps drag and drop. I want the canvas to be able to be dragged with the mouse, and I want it to display only the part that we can see on the screen, every time I drag it. Anyone have a good idea?

+5
source share
2 answers

I solved this problem using the jQuery UI draggable component on the canvas element. I wrapped it in a div - with overflow set to hidden, and made the canvas as large as I needed. Charm works

http://jqueryui.com/demos/draggable/

+3

All Articles