Slow in chrome (using hammer.js)
Sammekl opened this issue · 1 comments
Sammekl commented
I have been using the exact demo-code as in http://ariutta.github.io/svg-pan-zoom/demo/custom-event-handlers.html
In firefox / microsoft edge the SVG is extremely fast and snappy. However, in Chrome it loads significantly slower and the pan&cropping takes about 2 seconds. This is on both Chrome desktop as Chrome mobile.
HTML code:
<div class="monument">
<embed id="monumentSvg" class="wall" type="image/svg+xml" src="monument.svg style="width: 100%; height: 500px;"/>
</div>
The SVG file consists of a lot of text, which can be found here: http://jmu.martijnsch.net/monument/design/monument.svg
Could anyone help me out with this?
EDIT: I've tried different SVG's and it seems to be an issue with the tspan element.
Sammekl commented
Fixed it by generating the SVG in Adobe Illustrator. Now it's using test elements instead of tspan. This fixed the issue.