Skip to content

Commit

Permalink
Increment counter after usage
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanwijk committed Nov 8, 2020
1 parent 5ceccfa commit 7813e5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/d3-area-chunked.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,8 @@
var clipPath = defs.select(".".concat(className)); // initial render

if (clipPath.empty()) {
counter += 1;
clipPath = defs.append('clipPath').attr('class', className).attr('id', "d3-area-chunked-clip-".concat(chunkName, "-").concat(counter));
counter += 1;
}

return clipPath.attr('id');
Expand Down
2 changes: 1 addition & 1 deletion src/areaChunked.js
Original file line number Diff line number Diff line change
Expand Up @@ -822,10 +822,10 @@ export default function render() {

// initial render
if (clipPath.empty()) {
counter += 1;
clipPath = defs.append('clipPath')
.attr('class', className)
.attr('id', `d3-area-chunked-clip-${chunkName}-${counter}`);
counter += 1;
}

return clipPath.attr('id');
Expand Down

0 comments on commit 7813e5f

Please sign in to comment.