Closed ghost closed 3 years ago
Hello @icabbi-joegarlick
I'm glad it worked for you.
I will look to implement them. As long as you can use.
View for setTranslate https://github.com/jerosoler/Drawflow/issues/88
For zoom you can use the functions zoom_in
andzoom_out
or zoom_refresh
.
Jero
Thank you @jerosoler!
Yes I am currently using the zoom functions however id like to use the value outputted from the zoom event.
I tried doing:
editor.zoom = 0.9; editor.zoom_refresh();
however this seems to break zooming. It will only work when editor.zoom = 1.0 anything else breaks zooming.
Thank you for the setTranslate! I should have searched... Could this be added to the main code base?
Joe
Maybe you need to play with the variable zoom_last_value
Another way to do it, calculate the value and:
for(var i= 0; i<5; i++){
editor.zoom_in();
}
The setTranslate function would have to check the function, I don't know if it's completely correct.
Which I have time to review.
Ah, thanks for the reply. Zoom is working now
const zoomAmount = response.data.data.zoom;
if (zoomAmount != 1.00) {
this.editor.zoom_last_value = this.editor.zoom;
this.editor.zoom = zoomAmount;
this.editor.zoom_refresh();
}
Hey!
Not spoke in a while, Drawflow is still working really well for us!
I was wondering if it was possible for you to add a SetZoom and SetTranslate function.
So the values from the zoom event and the translate event can be saved and reloaded at a later date. This could also be useful for manual movement.
Thanks, Joe