Z
Z
zlodiak2018-08-31 12:29:45
JavaScript
zlodiak, 2018-08-31 12:29:45

How to wrap each block into a group?

I have several blocks of type rect rendered to the screen with a loop:
JSFIDDLE
But I would like each of these blocks to be wrapped in a g container like this:

<g>
<rect></rect>
</g>

Here is my attempt:
JSFIDDLE
But it fails, please help me to fix the code

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-08-31
@zlodiak

So ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question