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

Implement vector-effect=non-scaling-stroke #57

Open
dasha-popova opened this issue Oct 22, 2018 · 5 comments
Open

Implement vector-effect=non-scaling-stroke #57

dasha-popova opened this issue Oct 22, 2018 · 5 comments
Labels
difficulty:medium enhancement Hacktoberfest help wanted Help with creating a proper test-case, looking up the spec, or creating a pull request.

Comments

@dasha-popova
Copy link

Attribute vector-effect="non-scaling-stroke" for path, rect, line and others stops working.
No matter it's jsPdf v1.3.2 with svg2pdf 1.2.1 or jsPdf v2.0.0 with the latest version of svg2pdf.
In 1.1.1 it worked correctly.

@yGuy
Copy link
Member

yGuy commented Oct 22, 2018

I don't see we ever had support for this SVG feature in svg2pdf - can you provide sample input and output to prove your point?

@yGuy yGuy added the needs-info This issue is on hold, until more information becomes available. label Oct 22, 2018
@dasha-popova
Copy link
Author

dasha-popova commented Oct 22, 2018

Here two examples:

In console you can open the link and see the difference.

I've tried a lot of combinations of different versions and it works only with 1.1.1.
Any ideas?

@yGuy yGuy removed the needs-info This issue is on hold, until more information becomes available. label Oct 22, 2018
@yGuy
Copy link
Member

yGuy commented Oct 22, 2018

Thanks for the example. That's actually a coincidence: Up to 1.1.1 we obviously did not scale the strokes at all. If you remove the vector-effect in the 1.1.1 example you get the very same results and the lines do not get scaled (although they should). In a way this was a bug and you benefitted from it. The resolution to your problem would be the implementation of the feature, rather than fixing a non-existant feature.

@yGuy yGuy added enhancement help wanted Help with creating a proper test-case, looking up the spec, or creating a pull request. labels Oct 22, 2018
@dasha-popova
Copy link
Author

Oh, thanks :)
So will this feature be implemented in the nearest future?
Or where can I control(or remove) stroke scaling?

@HackbrettXXX
Copy link
Member

Since we do not need to implement the whole vector effects API for the "non-scaling-stroke" vector effect, this can be implemented quite easily. We might consider it for the next release.

@yGuy yGuy changed the title vector-effect=non-scaling-stroke stopped working since 1.2.1 Implement vector-effect=non-scaling-stroke Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:medium enhancement Hacktoberfest help wanted Help with creating a proper test-case, looking up the spec, or creating a pull request.
Projects
None yet
Development

No branches or pull requests

3 participants