Answer the question
In order to leave comments, you need to log in
How to scale an svg map using pinch-to-zoom with hammer.js?
The point is this. Need to scale in browser on mobile devices using pinch-to-zoom and rotate svg map.
Using scale3d or scale, at the moment of zooming, the map becomes a raster, so that everything is processed quickly. But after releasing the fingers, it is still raster unless css-transitions is enabled or redraw is performed. Enabling css-transitions is stupid, because everything lags, as the browser tries to make an animation between each state. But then she does redraw.
In the end, I settled on a hack
$(svg).hide();
$(svg).get(0).offsetHeight();
$(svg).show();
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