-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Filter on the root svg
element doesn't get applied
#61
Comments
Resolved in 132bf20 |
Tested with current 1.5.0-SNAPSHOT (1.5.0-20240226.002658) – now works as expected. Many thanks. |
As a fun fact, I've just noticed Firefox (compared to Chrome, for example) doesn't appear to get this right, also. |
Employ JSVG 1.5.0-SNAPSHOT and clean up source now that both weisJ/jsvg#61 and weisJ/jsvg#62 have been fixed.
On first glance it looks like Chrome's behavior is wrong here. The specification for filters defines
See https://drafts.fxtf.org/filter-effects/#FilterElement Either the coordinate system when the filter is applied (which is the same for top level Or the coordinate system used for filters is given by the bounding box of the object it is applied to. To me this indicates the result should look the same as if the filter were defined on an intermediate |
Just tested myself on Chrome 122.0.6261.94 and it appears that it behaves as jsvg. Which version of Chrome are you using? |
I'm using Edge 122.0.2365.59 to preview the files – there I observe the problem, and then the bitmaps I've shown are generated by a build using Puppeteer (21.6.1, if I'm not mistaken) with a Chrome (could be Chromium) backend, the version of which I'm not aware of. |
I decided that that the behaviour of Jsvg is the correct one in this scenario. If browser implementations don't even agree on how to handle it its probably better to steer away from making use of it anyway if one is concerned with cross-implementation compatibility. |
Yep. I've settled on applying the filter on a |
root-filter.svg
:Applying the filter on an all-encompassing
g
container works as expected:The text was updated successfully, but these errors were encountered: