Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recalculate clippath on chart.redraw; avoid Webkit select("clippath") #733

Merged
merged 1 commit into from
Dec 6, 2014

Conversation

davisford
Copy link
Contributor

This fixes #730

On chart.redraw() the clippath is not re-generated. I use chart.redraw() a lot in responsive layouts, instead of the more heavy-handed chart.render().

@davisford davisford changed the title recalculate clippath on chart.redraw; also avoid Webkit select("clippath... recalculate clippath on chart.redraw; avoid Webkit select("clippath") Oct 18, 2014
@gordonwoodhull
Copy link
Contributor

Hey @davisford, there was a little bug with your implementation. The good news is that for once the stock regression test was actually useful.

It picked up the following odd bit of svg:

<defs><yearly-bubble-chart-clip id="yearly-bubble-chart-clip">
   <rect width="888" height="198" transform="translate(-0, -0)"></rect>
</yearly-bubble-chart-clip></defs>

I think that would actually work, because the clippath is always selected by its ID, but nonetheless that's a pretty weird tag name!

I also added a test that fails without your fix so this should stay fixed. Thanks!!

@gordonwoodhull gordonwoodhull merged commit 49c1366 into dc-js:master Dec 6, 2014
gordonwoodhull added a commit that referenced this pull request Dec 6, 2014
gordonwoodhull added a commit that referenced this pull request Dec 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants