-
Notifications
You must be signed in to change notification settings - Fork 46
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
snap.svg.zpd does not work as intended if viewBox is set #12
Comments
I haven't tried it yet. Would you mind give a sample code about this? It's better having a demo than the words. Look forward for the beta version! hooray !!! |
The beta is now online. Functionality is currently very limited. I will add more methods in the next days. |
Nice. I saw it! Thanks |
Sure thing.. I think we should probably also create some unit-test (although I am not yet completely sure, how we should test the events) |
Just found out, that the mousewheel-event is a major headache in Firefox. "Mouse-wheeling" over a svg-element on a page with scrollbars will automatically scroll the page as well.. The common solutions do not seem to work (event.stopPropagation(); event.preventDefault; event.cancelBubble = false; event.returnValue = false; and returning false from the function). Any ideas would be most welcome. |
wohaa fixed the firefox issue.. we have to use paper.node.onwheel = function(event){..} with event canceling to make it work in newer firefox browsers. Updated the code accordingly |
Is this working now? then can I close it ? |
There is still an issue using the zoomTo-function if the element is rotated.. dragging of elements and plugin-option are not yet available.. Might get around to it next week. |
duplicate with #15 |
SVG-images can be made responsively by using the viewBox attribute and setting it to the size of the svg content. The svg-element will then fit the content to the width its container.
Unfortunately, the snap.svg.zpd-library does currently not work as intended in this case, as it does not factor in the transformation already applied to the svg-element through the viewBox.
I am currently creating a new version of the library that will incorporate this functionality. There might though be some breaking api-changes.
Please stay tuned for more.. A beta-release can be expected next week.
The text was updated successfully, but these errors were encountered: