I want to have a grid that I can turn on and off. Does SVG have the concept
of a layer where all members of the layer can be made invisible or visible
or would I have to iterate over all my little "x"'s and turn each one on and
On Jul 16, 5:51 pm, "Siegfried Heintze" <[hidden email]> wrote:
> I want to have a grid that I can turn on and off. Does SVG have the concept
> of a layer where all members of the layer can be made invisible or visible
> or would I have to iterate over all my little "x"'s and turn each one on and
To make a group invisible, use the visibility attribute. This will
make the content of the group (layer) visible/invisible, but it will
still be there, you just won't be able to see it.
To make a group not render at all, i.e not respond to any interaction
at all use the display attribute. Display 'none' will render the
content of the group totally innocuous as if it were not there at all.
In effect it is not.
SVG uses the painters model, I think this is important to know if you
are used to CAD systems. the last group in the document is drawn last
and it will appear on top of everything else. So if you want your
grid in front of the image, put it at the bottom of the document.
Also InkScape, an excellent SVG editor, has a feature that emulates layers.