-
Notifications
You must be signed in to change notification settings - Fork 475
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
Setting path fill, stroke, and strokeWidth properties not working as expected #509
Comments
I have this same problem. Did you end up finding a solution for it? |
While a glyph is based on a path, it doesn't make sense for me to have different styles for each glyph. const bPath = bGlyph.path;
const bStyles = {
fill: bPath.fill,
stroke: bPath.stroke,
strokeWidth: bPath.strokeWidth
};
const options = {
style: bStyles
};
bGlyph.getPath(0, 0, 72, options); What we could do to make this a bit more straight-forward is implement a new option like |
Ok, we actually need to copy the properties in order to support #459 |
Expected Behavior
When creating a new Glyph, I expected the path's
fill
,stroke
, andstrokeWidth
properties to be passed on to theGlyph.path
property.Current Behavior
After setting
fill
,stroke
, andstrokeWidth
on a path and then adding it to a new glyph, loggingglyph.getPath().path
returns a path with defaultfill
,stroke
, andstrokeWidth
properties.Steps to Reproduce
console.log
returns:Environment
The text was updated successfully, but these errors were encountered: