Make clip-path configurable (relative/absolute)
Open
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
I have some problems with converting generated SVG to PDF. One of them is that `clip-path` attributes of `g`'s are absolute. Can you please provide an option for enabling/disabling relative urls?
I found commit 262672f for Issue #134 and propose to make it like this:
``` javascript
function getClipPath(id) {
var relative = $$.config.relativeClipPath || window.navigator.appVersion.toLowerCase().indexOf("msie 9.") >= 0;
return "url(" + (relativeClipPath ? "" : document.URL.split('#')[0]) + "#" + id + ")";
}
```
Cheers!
Contributor guide
Assessment
This issue has not been assessed yet.