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

Create and move text

Expand Messages
  • jordangcsnt
    Hi I have a problem, I want to write a text and then I would like to move it with the mouse, I tried to find some examples but I didn t found them, I hope some
    Message 1 of 4 , Jan 9, 2007
    • 0 Attachment
      Hi I have a problem, I want to write a text and then I would like to
      move it with the mouse, I tried to find some examples but I didn't
      found them, I hope some one could help me with some exmaple or a link,
      thanks
    • ddailey
      If you can t find anything simpler, then take a look at http://srufaculty.sru.edu/david.dailey/svg/drag.svg David ... From: jordangcsnt To:
      Message 2 of 4 , Jan 9, 2007
      • 0 Attachment
        If you can't find anything simpler, then take a look at

        http://srufaculty.sru.edu/david.dailey/svg/drag.svg

        David
        ----- Original Message -----
        From: jordangcsnt
        To: svg-developers@yahoogroups.com
        Sent: Tuesday, January 09, 2007 1:23 PM
        Subject: [svg-developers] Create and move text


        Hi I have a problem, I want to write a text and then I would like to
        move it with the mouse, I tried to find some examples but I didn't
        found them, I hope some one could help me with some exmaple or a link,
        thanks





        [Non-text portions of this message have been removed]
      • ddailey
        Sorry I forgot about the create part of what you wanted. Again, I suspect there are lots of simpler things out there, but this certainly allows for creation
        Message 3 of 4 , Jan 9, 2007
        • 0 Attachment
          Sorry I forgot about the create part of what you wanted. Again, I suspect there are lots of simpler things out there, but this certainly allows for creation and dragging of text.

          cheers, David
          ----- Original Message -----
          From: jordangcsnt
          To: svg-developers@yahoogroups.com
          Sent: Tuesday, January 09, 2007 1:23 PM
          Subject: [svg-developers] Create and move text


          Hi I have a problem, I want to write a text and then I would like to
          move it with the mouse, I tried to find some examples but I didn't
          found them, I hope some one could help me with some exmaple or a link,
          thanks





          [Non-text portions of this message have been removed]
        • ddailey
          Hi I have a problem, I want to write a text and then I would like to move it with the mouse, I tried to find some examples but I didn t found them, I hope some
          Message 4 of 4 , Jan 9, 2007
          • 0 Attachment
            Hi I have a problem, I want to write a text and then I would like to
            move it with the mouse, I tried to find some examples but I didn't
            found them, I hope some one could help me with some exmaple or a link,
            thanks

            Sorry, I forgot the link: http://srufaculty.sru.edu/david.dailey/svg/graphs10.svg

            Basically, assuming you're doing this with JavaScipt, then use createElementNS to create the text node, and createTextNode to put stuff in it:

            T=document.createElementNS(xmlns,"text")

            Msg=document.createTextNode(4321)

            T.appendChild(Msg)

            document.documentElement.appendChild(T)



            Then dragging and dropping with the mouse is done sorta like in the examples.

            DD

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