- -URL- API . SVG, :
<svg>
<clipPath id="clip-path-ember1919">
<path d="..."></path>
</clipPath>
<g clip-path="url(#clip-path-ember1919)">
<rect ...></rect>
</g>
</svg>
D3 append:
var emberId = this.$().attr('id');
svg.append('g')
.attr('clip-path', "url(#clip-path-#{emberId})");
, API , , ( URL), window.location.pathname:
var emberId = this.$().attr('id');
var relPath =
svg.append('g')
.attr('clip-path', "url(." + window.location.pathname + "#clip-path-" + emberId + ")");
SVG, , .
<svg>
<clipPath id="clip-path-ember1919">
<path d="..."></path>
</clipPath>
<g clip-path="url(./path/to/page#clip-path-ember1919)">
<rect ...></rect>
</g>
</svg>
: , window.location.pathname URL.