Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow in chrome (using hammer.js) #151

Closed
Sammekl opened this issue Oct 4, 2015 · 1 comment
Closed

Slow in chrome (using hammer.js) #151

Sammekl opened this issue Oct 4, 2015 · 1 comment
Labels

Comments

@Sammekl
Copy link

Sammekl commented Oct 4, 2015

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 Sammekl closed this as completed Oct 6, 2015
@Sammekl Sammekl reopened this Oct 6, 2015
@Sammekl
Copy link
Author

Sammekl commented Oct 6, 2015

Fixed it by generating the SVG in Adobe Illustrator. Now it's using test elements instead of tspan. This fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants