R
R
Raneto4ka2019-05-25 17:31:54
JavaScript
Raneto4ka, 2019-05-25 17:31:54

How to make svg zoom smoothly?

The slider slider should increase/decrease as its position changes accordingly, ranging from 35px to 53px.
I roughly calculated that for each step he should add in size by 0.005, but I don’t know how to write a loop for this.
https://codepen.io/Raneto4ka/pen/byLJea

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lamer350, 2019-05-25
@Raneto4ka

35+(53-35)*(ui.value/100)
But it's worth noting that your slider starts from 1 and in the minimum position it will not be exactly 35, but ~35.3px.
Just paste this formula everywhere instead of ui.value for width and height

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question