Answer the question
In order to leave comments, you need to log in
How to dynamically change the value of an attribute?
I have an element that has its transform value changed.
<g id="wrapper-svg" transform="matrix(1, 0, 0, 1, 0, 0)"></g>
data() {
return {
matrix: {
a: 1,
b: 0,
c: 0,
d: 1,
x: 0,
y: 0,
}
}
}
wrapper.setAttribute("transform", `matrix(${a}, ${b}, ${c}, ${d}, ${x}, ${y})`)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question