Skip to content

Commit

Permalink
Add default white stroke to selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Jun 3, 2016
1 parent fd21ec6 commit 2ca10ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The brush also creates the SVG elements necessary to display the brush selection
```html
<g class="brush" fill="none" pointer-events="all" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
<rect class="overlay" pointer-events="all" cursor="crosshair" x="0" y="0" width="960" height="500"></rect>
<rect class="selection" cursor="move" fill="rgba(0,0,0,0.15)" x="112" y="194" width="182" height="83"></rect>
<rect class="selection" cursor="move" fill="#000" fill-opacity="0.15" stroke="#fff" shape-rendering="crispEdges" x="112" y="194" width="182" height="83"></rect>
<rect class="handle handle--n" cursor="ns-resize" x="107" y="189" width="192" height="10"></rect>
<rect class="handle handle--e" cursor="ew-resize" x="289" y="189" width="10" height="93"></rect>
<rect class="handle handle--s" cursor="ns-resize" x="107" y="272" width="192" height="10"></rect>
Expand Down
5 changes: 4 additions & 1 deletion src/brush.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ function brush(dim) {
.enter().append("rect")
.attr("class", "selection")
.attr("cursor", cursors.selection)
.attr("fill", "rgba(0,0,0,0.15)");
.attr("fill", "#000")
.attr("fill-opacity", 0.15)
.attr("stroke", "#fff")
.attr("shape-rendering", "crispEdges");

var handle = group.selectAll(".handle")
.data(dim.handles, function(d) { return d.type; });
Expand Down

0 comments on commit 2ca10ce

Please sign in to comment.