Loading ...
Sorry, an error occurred while loading the content.
 

Restrict an object to stay within another object....................

Expand Messages
  • Mr Rauf
    All, This is related to SVG, I have a large SVG object made of paths which stays static. With a press of a button, I can create another SVG object inside the
    Message 1 of 1 , Apr 7, 2011
      All,
      This is related to SVG, I have a large SVG object made of paths which stays static. With a press of a button, I can create another SVG object inside the larger object. The second object can be dragged with the mousedown.

      PROBLEM: Now I want to add a restriction so that the second object created cannot venture outside of the main object.

      I tried using 'mouseup' for restriction but that does not work because the restriction is applied according to the cursor point on the second object, rather than the border of the second object.

      Hope someone can help. Cheers,
    Your message has been successfully submitted and would be delivered to recipients shortly.