L
L
last_round2017-07-15 15:59:05
JavaScript
last_round, 2017-07-15 15:59:05

How to put an element inside an svg circle?

Through Snap SVG created a circle. and completely filled it with black. Question: how to insert a svg icon or text or png icon inside this black circle, or better if all together? UPD i is the index of the loop nodes is an array of objects with parameters x, y
paper.circle(100, 100, 50);

icon = paper.svg nodes[i].x - 15, nodes[i].y - 16, 30, 32, 0, 0, 30, 32
  
  Snap.load "icons/#{iconName}.svg", (iconName) ->
    icon = icon.append iconName

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2017-07-15
@politon

https://jsfiddle.net/6c975bb0/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question