chenbo007 / svg-edit

Automatically exported from code.google.com/p/svg-edit
0 stars 0 forks source link

Support Layers #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Right now everything exists in one 'layer'.  It would be nice in the future
to have the ability to add/delete layers, hide layers and set the 'current'
layer.

This is very achievable in SVG actually:

- each layer is a top-level <g>
- hiding a layer is as simple as setting display="none" on that <g>
- selection would only be possible for elements in the current layer (we
turn off pointer-events for all elements not in the current layer?)

Something I'd like to see for 2.4 and beyond.

Original issue reported on code.google.com by codedr...@gmail.com on 11 Jul 2009 at 1:23

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 17 Aug 2009 at 7:13

GoogleCodeExporter commented 9 years ago
1) Need UI element to display Layer panel (lists all layers)
2) Clicking a layer switches which layer is current (i.e. elements will respond 
to
mouse events and can be selected)
3) Can rename layers (must be unique, gets put into the id as layer-FOO?)
4) Can move layers up/down (drag?)
5) Can turn layers display on/off (little eye icon like in Photoshop?)
6) Need UI element to delete layer (little x icon?)
7) Need UI element to create new layer (New Layer button)

Original comment by codedr...@gmail.com on 17 Aug 2009 at 7:16

GoogleCodeExporter commented 9 years ago
Trying to envision this...would the layer panel ONLY show the "layers" (group
elements) or also all the contained elements (and the elements under the root)? 

If we were to use PhotoShop terminology, each element would automatically be a 
layer,
while the "layer" you refer to would be a "group" (which would be a convenient 
name
to stick to for our group elements). Personally this makes most sense to me, but
perhaps I misunderstand your proposal.

Original comment by adeve...@gmail.com on 17 Aug 2009 at 7:44

GoogleCodeExporter commented 9 years ago
Hi Alexis, IRC might be better to work this out :)

I was envisioning the Photoshop Layers panel - basically show the top-level 
groups
that hold elements of each layer (but not show the individual elements inside 
the
layers).

Original comment by codedr...@gmail.com on 17 Aug 2009 at 7:56

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 19 Aug 2009 at 2:36

GoogleCodeExporter commented 9 years ago
Issue 196 has been merged into this issue.

Original comment by codedr...@gmail.com on 14 Sep 2009 at 4:21

GoogleCodeExporter commented 9 years ago
Q: How to move a set of elements from one layer to another?

A: Might need a selected/multiselected control that says:

Layer: <select control that shows the current layer>

If the user changes the layer by choosing a new one in the pulldown the 
elements are
moved to that later (appended).  If there is only one layer, we do not need to 
show
the control.

Original comment by codedr...@gmail.com on 14 Sep 2009 at 7:07

GoogleCodeExporter commented 9 years ago
8) ability to merge layers

Original comment by codedr...@gmail.com on 16 Sep 2009 at 7:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
r673 has a pretty good implementation of the Layers feature.  Things still 
missing:

- ability to change the stacking order of layers
- ability to turn visibility on/off for each layer
- ability to move elements from one layer to another
- auto-hide the layers panel
- ability to merge/flatten layers

Will keep the issue open until at least the top two have been addressed.

Original comment by codedr...@gmail.com on 22 Sep 2009 at 2:55

GoogleCodeExporter commented 9 years ago
Great progress, Jeff! Looks very nice. :)

Original comment by adeve...@gmail.com on 22 Sep 2009 at 12:08

GoogleCodeExporter commented 9 years ago
Thanks.  Thanks to http://twitter.com/codedread/status/4166509369 what's left 
to do
before I close this feature is:

  * change the select/option into a table (and simulate selection of a row)
  * add a column for the 'visibility' icon
  * hook up mouse listeners to the visiblity icon and toggle display from 'inline' to
'none'
  * add display to the whitelist for <g> elements

Further enhancements (moving elements from one layer to another and merging 
layers)
would be dealt with in separate issues).

Original comment by codedr...@gmail.com on 22 Sep 2009 at 4:52

GoogleCodeExporter commented 9 years ago
Ok, I've implemented the things I said I would for Comment 12 in r704.  Going to
close this issue and open issues for:

  * Merging Layers
  * Moving elements to new layers

Original comment by codedr...@gmail.com on 24 Sep 2009 at 4:49