react-svg-path icon indicating copy to clipboard operation
react-svg-path copied to clipboard

Provide user help with layer ordering

Open joemaddalone opened this issue 5 years ago • 0 comments

Specifically in nesting scenarios the order or layers should be controllable with minimal effort.

<Parent order={3}>
   <Child1 order={2} />
   <Child2 order={1}>
       <Child2-1 order={0} />
   </Child2>
</Parent>

without the ordering this would render

<parent-path />
<child-1-path />
<child-2-path />
<child-2-1-path />

with ordering we would get

<child-2-1-path />
<child-2-path />
<child-1-path />
<parent-path />

This may be trickier than it seems, but should be possible and would solve a real pain point in svg composition. From a holistic approach if this were introduced for everything inside of <Svg /> it could prove very powerful - it could also mean inventing a v-dom for svg though...

joemaddalone avatar Nov 02 '20 15:11 joemaddalone