Skip to content

Commit

Permalink
Fix clip path issue on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetitcolas committed Feb 29, 2016
1 parent 3f7d3f7 commit c82f025
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
7 changes: 4 additions & 3 deletions lib/drawer/index.js
Expand Up @@ -9,9 +9,9 @@ import lineSeparatorFactory from './lineSeparator';

export default (svg, dimensions, scales, configuration) => {
const defs = svg.append('defs');
defs.append('svg:clipPath')
.attr('id', 'drops-container')
.append('svg:rect')
defs.append('clipPath')
.attr('id', 'drops-container-clipper')
.append('rect')
.attr('id', 'drops-container-rect')
.attr('x', configuration.margin.left + 10)
.attr('y', 0)
Expand All @@ -29,6 +29,7 @@ export default (svg, dimensions, scales, configuration) => {

const dropsContainer = svg.append('g')
.classed('drops-container', true)
.attr('clip-path', 'url(#drops-container-clipper)')
.style('filter', 'url(#metaballs)');

const extremaContainer = svg.append('g')
Expand Down
7 changes: 1 addition & 6 deletions style.css
Expand Up @@ -9,8 +9,7 @@
stroke-width: 1px;
}

.line-separator, .x-axis
{
.line-separator, .x-axis {
stroke: black;
fill: none;
stroke-width: 1px;
Expand All @@ -34,7 +33,3 @@ text {
height: 20px;
padding: 10px;
}

.drops-container {
clip-path: url(#drops-container);
}

0 comments on commit c82f025

Please sign in to comment.