-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add strokeDashOffset and svg corresponding attribute #5398
Conversation
Hey thanks! As additional item you should remove dist folder from committing. We need to modify parser, i do not see the change in parser.js that will make possible to read the value and adding it to the object Also we need new test and fix old tests. |
look here for parser.js |
i wonder if node-canvas does support it. |
Sorry for the dist folder! |
ok you are working on your master branch. That will make everything harder. the last master good commit you should have is so if you write |
there are so many tests to update, do not rush because you will get burned. |
aah easier to run locally :-) thanks |
I have several errors about imageSmoothing, is it fixable?
|
i think your node-canvas installation failed. Before installing fabric in the develop folder with https://github.com/Automattic/node-canvas/tree/v1.x you can still avoid running them on node doing:
this will open something like this: and from the suggested http address you can see what is going on in the browser, where you do not need to install node-canvas. |
this is looking good. we need a small last effort: Thanks! |
Ok so the idea would be to create an svg like one of those in the asset folder: create a new file called in this array: Now in the file you created try to add some meaningfull examples that can cover also that other dash thing you talked about in the other issue ( starting with 0 ) Modify the file so that we have: As you see in the starting file some are declared in the style, other as property. You can do as you want. Regression should be catched anyway. Then last step, you need to generate the golden image. Running the tests with the original dist folder should fail this test, while with the new built fabric should pass. |
@@ -38,6 +38,7 @@ | |||
'letter-spacing': 'charSpacing', | |||
'paint-order': 'paintFirst', | |||
'stroke-dasharray': 'strokeDashArray', | |||
'stroke-dashoffset': 'strokeDashOffset', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'stroke-dashoffset': 'strokeDashOffset', | |
// TODO: add support for percentage value when parsing from SVG | |
'stroke-dashoffset': 'strokeDashOffset', |
@blobinabottle i ll merge this as it is, is good enough. I ll add the additional tests. |
Ah sorry I planed to try doing the tests this weekend. I think it’s good I learn that :) |
you can add test, in a separate PR, and they should have different results with built and non built fabric.js |
If instruction i left are not clear, please ping me. |
* Add strokeDashOffset and svg corresponding attribute
First PR here. Hope nothing wrong.
I added strokeDashOffset on all objects with stroke.
I tested successfully toSVG() with rect, circle, line.