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

Drag from DOM Element of HTML & Drop into SVG Element

Expand Messages
  • barkha
    Dear All, I want to drag HTML Div Element from a list of Div elements & drop it as an image into the SVG element of SVG file that is embedded with the same
    Message 1 of 2 , Jun 1, 2012
    • 0 Attachment
      Dear All,

      I want to drag HTML Div Element from a list of Div elements & drop it as an image into the SVG element of SVG file that is embedded with the same HTML file that contains the list of Division Elements,what is the exact way to achieve this?

      Regards,
      Barkha
    • David Dailey
      Hello Barkha, This is an interesting question, and is something I ve never tried. What I would try is something like this (rolling my own event handlers and
      Message 2 of 2 , Jun 1, 2012
      • 0 Attachment
        Hello Barkha,



        This is an interesting question, and is something I've never tried. What I
        would try is something like this (rolling my own event handlers and script
        rather than relying on libraries that might do some of the interface
        handling)

        a) Activate the html documentElement so that it listens to mousemove
        after the object has been selected

        b) Set the svg documentElement so that it responds to onmouseover -
        thereupon listening to mousemove

        c) Onmouseover on the svg document, trigger script to append an
        <image> element to the svg document

        d) Successively reposition the svg <image> as the mouse moves in the
        svg documentElement

        What I don't know are two rather large uncertainties

        a) Whether or not the onmouseover atop the SVG will be heard while the
        mouse is busy dragging the HTML <img>

        b) Whether any cross-browser consistency at all will be found in this
        sort of HTML5 embedding of SVG in HTML (generally, the use of <object> or
        <embed> shows considerably more cross-browser consistency than any of the
        newfangled things that are only in candidate recommendation status, or less)

        Others may have had more experience with this and/or suggest simpler
        approaches, but one bad idea may give others incentive to respond and
        improve



        Cheers

        David



        From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
        On Behalf Of barkha
        Sent: Friday, June 01, 2012 10:07 AM
        To: svg-developers@yahoogroups.com
        Subject: [svg-developers] Drag from DOM Element of HTML & Drop into SVG
        Element





        Dear All,

        I want to drag HTML Div Element from a list of Div elements & drop it as an
        image into the SVG element of SVG file that is embedded with the same HTML
        file that contains the list of Division Elements,what is the exact way to
        achieve this?

        Regards,
        Barkha





        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.