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

Query, z-index

Expand Messages
  • clockwerx84
    Hi guys, I just picked up SVG as a tool to work with, thinking, hey, this is perfect to do tricks like drag-and-drop page elements on. Observe: Click on any of
    Message 1 of 2 , Jul 3, 2005
      Hi guys,
      I just picked up SVG as a tool to work with, thinking, hey, this is
      perfect to do tricks like drag-and-drop page elements on.

      Observe: Click on any of the squares, and drag it about

      [firefox 1.1]
      http://getfridged.com/cluttr/room.php

      There's no z-index. I can't tell my browser to pull something to the
      "top" when I'm directly interacting with it. Other stuff gets in the way.

      What were the reasons for not just going "make z-index exactly like
      regular CSS for HTML"? Or even "let's have z-index"?
      I can't find anything in discussion, it's not in any of the specs, and
      basically this is something pretty crippling for a developer like myself.
      Are there any alternatives? Am I just looking at something defined
      elsewhere?
    • Holger Will
      ... Hi because in svg the order of the element-tree equals the drawing order, all you have to do is get your element and append it atop the other elements.
      Message 2 of 2 , Jul 3, 2005
        clockwerx84 schrieb:

        > Hi guys,
        > I just picked up SVG as a tool to work with, thinking, hey, this is
        > perfect to do tricks like drag-and-drop page elements on.
        >
        > Observe: Click on any of the squares, and drag it about
        >
        > [firefox 1.1]
        > http://getfridged.com/cluttr/room.php
        >
        > There's no z-index. I can't tell my browser to pull something to the
        > "top" when I'm directly interacting with it. Other stuff gets in the way.
        >
        > What were the reasons for not just going "make z-index exactly like
        > regular CSS for HTML"? Or even "let's have z-index"?
        > I can't find anything in discussion, it's not in any of the specs, and
        > basically this is something pretty crippling for a developer like myself.
        > Are there any alternatives? Am I just looking at something defined
        > elsewhere?
        >
        Hi

        because in svg the order of the element-tree equals the drawing order,
        all you have to do is get your element and append it atop the other
        elements.

        something like this:

        var elem=document.getElementById("someId")
        elem.parentNode.appendChild(elem)

        hth
        Holger
      Your message has been successfully submitted and would be delivered to recipients shortly.