Skip to content

Commit

Permalink
fix: exclude Graphic padding from paddingColor
Browse files Browse the repository at this point in the history
  • Loading branch information
johsi-k committed Mar 16, 2020
1 parent 8be1aaa commit 756205f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/components/Core/Section/Section.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@
<defs>
<mask id={`mask-${sectionId}-padding-bg`}>
<rect
width="100%"
height="100%"
x={Math.min(scaledCoordinates.x1, scaledCoordinates.x2)}
y={Math.min(scaledCoordinates.y1, scaledCoordinates.y2)}
width={Math.abs(scaledCoordinates.x2 - scaledCoordinates.x1)}
height={Math.abs(scaledCoordinates.y2 - scaledCoordinates.y1)}
fill="white" />
<rect
x={Math.min(...rangeX)}
Expand Down
2 changes: 1 addition & 1 deletion test/sandbox/src/examples/SelectPolygon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
let highlightLine
</script>

<Graphic width={500} height={500}>
<Graphic width={500} height={500} padding={30}>

<Section
bind:this={section}
Expand Down
3 changes: 1 addition & 2 deletions test/sandbox/src/examples/SelectRectangle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@
let highlightLine
</script>

<Graphic width={500} height={500}>
<Graphic width={500} height={500} padding={30}>

<Section
bind:this={section}
padding={30}
scaleX={scaleLinear().domain([0, 10])}
scaleY={scaleLinear().domain([0, 10])}
{onMousedown}
Expand Down

0 comments on commit 756205f

Please sign in to comment.