code_junkie

With javascript, can I change the Z index/layer of an svg “g” element

Nov 13th, 2011
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. var svg = doc.createElemNS('svg');
  2. var circle = doc.createElemNS('circle');
  3. var line = doc.createElemNS('line');
  4.  
  5. svg.appendChild(circle); // appends it
  6. svg.appendChild(line); // appends it over circle
  7. svg.appendChild(circle); // redraws it over line now
Add Comment
Please, Sign In to add comment