c3js / c3js/c3

Make clip-path configurable (relative/absolute)

Open
#1,046 4 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.