I created a raphael canvas. There are some draggable circle and rectangle on it. A problem is when I dragged the object to the bottom, the object appeared "half circle" or "half rectangle" and the canvas cannot be extended as the drag movement. How can I create the "infinite" canvas that allows me to drag the object in a larger space.
I am thinking about using viewbox or scroller bar? But seems like scroller bar also have the limit right? Basically, I have no idea about the borderless canvas. Anyone can help?
One solution is to perform a check on all your objects to see if they're inside or outside your current canvas size. If it's outside, you give the canvas new width/height.
Here's a working example (although not using dragable objects) just to show the idea:
See fiddle in order to play around with the variables.