Question
Opened this issue · 4 comments
This message isn't suppossed to be here but I hope you don't mind.
Could you please tell me: 'How to get the zoom value in percentage?'
Hey ! I'm wondering the same question, did you find an answer ?
Hey ! I'm wondering the same question, did you find an answer ?
Hi!
No, I'm just doing some bogus calculations, based on zoom movements.
Like this:
export const CLICK_STEP_ZOOM_LEVEL = 40;
export const WHEEL_STEP_ZOOM_LEVEL = 200 / 15;
export const MIN_ZOOM_LEVEL = 100;
export const MAX_ZOOM_LEVEL = 300;
Next, I perform the calculations based on these values.
Hey ! I'm wondering the same question, did you find an answer ?
Hi! No, I'm just doing some bogus calculations, based on zoom movements.
Like this: export const CLICK_STEP_ZOOM_LEVEL = 40; export const WHEEL_STEP_ZOOM_LEVEL = 200 / 15; export const MIN_ZOOM_LEVEL = 100; export const MAX_ZOOM_LEVEL = 300;
Next, I perform the calculations based on these values.
Actually, I think I found the way to get the current zoom level, in the <TransformWrapper>
component, there is a property called onZoom that returns a ref
parameter that contains a state
object that contains a scale
value. It seems that this scale
value is the current zoom level. I don't know if it can help you in the future, but it seems to do the trick for me !
Hey ! I'm wondering the same question, did you find an answer ?
Hi! No, I'm just doing some bogus calculations, based on zoom movements.
Like this: export const CLICK_STEP_ZOOM_LEVEL = 40; export const WHEEL_STEP_ZOOM_LEVEL = 200 / 15; export const MIN_ZOOM_LEVEL = 100; export const MAX_ZOOM_LEVEL = 300;
Next, I perform the calculations based on these values.Actually, I think I found the way to get the current zoom level, in the
<TransformWrapper>
component, there is a property called onZoom that returns aref
parameter that contains astate
object that contains ascale
value. It seems that thisscale
value is the current zoom level. I don't know if it can help you in the future, but it seems to do the trick for me !
Hey ! I'm wondering the same question, did you find an answer ?
Hi! No, I'm just doing some bogus calculations, based on zoom movements.
Like this: export const CLICK_STEP_ZOOM_LEVEL = 40; export const WHEEL_STEP_ZOOM_LEVEL = 200 / 15; export const MIN_ZOOM_LEVEL = 100; export const MAX_ZOOM_LEVEL = 300;
Next, I perform the calculations based on these values.Actually, I think I found the way to get the current zoom level, in the
<TransformWrapper>
component, there is a property called onZoom that returns aref
parameter that contains astate
object that contains ascale
value. It seems that thisscale
value is the current zoom level. I don't know if it can help you in the future, but it seems to do the trick for me !
Oh, right! Thank you so much!
I'll see about making the improvement.