You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a bug or something to do with the SVG versioning... but for anyone experiencing issues importing masked SVG's into the applications I mention below, this is likely your issue.
When using the .maskWith() command, the mask is double quoted:
<g> mask="url("#SvgjsMask1002")" </g>
This approach works fine in the browser and most places. But when downloading the SVG and importing to something like Adobe illustrator or Inkscape it fails to render the mask.
The following line, wraps the mask in single quotations, and a supplemental double quotation for the internal #id.
I've adjusted my local version to the following (which fixes the issue for me): return this.attr('mask', 'url(#' + masker.id() + ')');
I don't know a great deal about the SVG versioning (changes to syntax that may have happened over time), this may be correct for a given version. The current documentation seems to suggest double quotes are not required: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/mask
If this is intended behaviour then of course feel free to close this.
The text was updated successfully, but these errors were encountered:
Not sure if this is a bug or something to do with the SVG versioning... but for anyone experiencing issues importing masked SVG's into the applications I mention below, this is likely your issue.
When using the .maskWith() command, the mask is double quoted:
<g> mask="url("#SvgjsMask1002")" </g>
This approach works fine in the browser and most places. But when downloading the SVG and importing to something like Adobe illustrator or Inkscape it fails to render the mask.
The following line, wraps the mask in single quotations, and a supplemental double quotation for the internal #id.
svg.js/src/elements/Mask.js
Line 47 in 4524c20
I've adjusted my local version to the following (which fixes the issue for me):
return this.attr('mask', 'url(#' + masker.id() + ')');
I don't know a great deal about the SVG versioning (changes to syntax that may have happened over time), this may be correct for a given version. The current documentation seems to suggest double quotes are not required:
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/mask
If this is intended behaviour then of course feel free to close this.
The text was updated successfully, but these errors were encountered: