-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
maskWith does not work with <base> tag #36
Comments
Is this a svg.js issue or a svg issue? Have your tried writing svg manually to see if it does work without svg.js? |
I think both. I must in any case make adjustments to svg.js. In this way it works now for me. SVG.extend(SVG.Element, {
// Distribute mask to svg element
maskWith: function(element) {
/* use given mask or create a new one */
this.mask = element instanceof SVG.Mask ? element : this.parent.mask().add(element)
if ($j.browser.msie)
{
return this.attr('mask', 'url(#' + this.mask.attr('id') + ')')
}
else
{
return this.attr('mask', 'url('+window.location+'#' +this.mask.attr('id') + ')')
}
}
}) |
This is a very specific problem and can be solved as you suggested. I don't think it belongs to be part of the library. But thanks for the proposition. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The svg.js works quite well and could be implemented quickly. Unfortunately, the mask seems to stop working as soon as you use the tag in the head. If this then refers to the root directory and the html file is in a subfolder. This applies with clip and maskWith.
greetings
The text was updated successfully, but these errors were encountered: