c3 icon indicating copy to clipboard operation
c3 copied to clipboard

Make clip-path configurable (relative/absolute)

Open rand0m86 opened this issue 10 years ago • 4 comments

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:

function getClipPath(id) {
    var relative = $$.config.relativeClipPath || window.navigator.appVersion.toLowerCase().indexOf("msie 9.") >= 0;
    return "url(" + (relativeClipPath ? "" : document.URL.split('#')[0]) + "#" + id + ")";
}

Cheers!

rand0m86 avatar Mar 05 '15 16:03 rand0m86

+1

Having the same problem when using C3 by loading the HTML document with res:// protocol (compiled in EXE).

Perhaps there is an alternative solution for 5813ff389fa08f878165d1c6375d817053b6917e, so that there must not be an absolute URL at all.

thojo avatar Oct 21 '15 09:10 thojo

+1

duderoot avatar Oct 21 '15 09:10 duderoot

+1

pedrostc avatar Oct 13 '17 17:10 pedrostc

+1

alexsurg avatar Sep 19 '21 06:09 alexsurg