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

Does it work on html elements #7

Open
arruw opened this issue Aug 20, 2019 · 3 comments
Open

Does it work on html elements #7

arruw opened this issue Aug 20, 2019 · 3 comments

Comments

@arruw
Copy link

arruw commented Aug 20, 2019

Does it work on HTML elements or just on svg?

@michaschwab
Copy link
Owner

Hi matjazmav,
EasyPZ by default works on SVGs using the "transform" attribute. However, EasyPZ is highly configurable and you can use it to react to pan and zoom interactions by transforming elements however you like. In the canvas examples, we use EasyPZ to set the transform within the canvas context. You could do something similar depending on what html elements you have, and change their sizes. What's the application?

@hrvoj3e
Copy link

hrvoj3e commented Oct 30, 2019

How would I use it with <img>?
Blank page with an image.

https://jsfiddle.net/wge1v43b/1/

<img easypz src="data:image/png;base64,iVBORw0KGgoA...K5CYII=" style="width: 90%;">
<script src="https://code.easypz.io/easypz.latest.js"></script>

@michaschwab
Copy link
Owner

@matjazmav and @hrvoj3e sorry for the big delay, but here's a small example. https://jsfiddle.net/michaschwab/smLe31hq/17/

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

No branches or pull requests

3 participants