A
A
Andrey Surzhikov2018-11-13 14:54:20
SVG
Andrey Surzhikov, 2018-11-13 14:54:20

How to bind SVG Path to Vue.JS model?

Good afternoon!
There is a svg image (embedded inline in html). It contains 6 path objects (head, spine, chest, abdomen, arms, legs - a mini-atlas of the human body).
5beab9df2f759105220933.png
When you click on the head - you need to make the head stand out (the active class is added).
How to bind path objects with vue.js data so that when the " area " property of the model changes, the desired path element is selected and vice versa, when you click on one of the 6 paths in data, the value of " area " changes.
There are no questions about how to do this on native JS, but on vue.js it is not yet clear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-11-13
@Surzhikov

for example (since you decided not to show your svg, I took the first googled one)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question