Skip to content

Commit

Permalink
Select shapes using swatch class
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneskuettner committed Dec 14, 2017
1 parent d9ab9f5 commit 7e0eb71
Show file tree
Hide file tree
Showing 11 changed files with 310 additions and 227 deletions.
306 changes: 202 additions & 104 deletions d3-legend.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions d3-legend.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/d3-legend.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/docs.min.js

Large diffs are not rendered by default.

102 changes: 47 additions & 55 deletions indexRollup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion indexRollup.js.map

Large diffs are not rendered by default.

103 changes: 48 additions & 55 deletions indexRollupNext.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion indexRollupNext.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function color(){
.attr("class", classPrefix + "cell")
cellEnter.append(shape).attr("class", classPrefix + "swatch")

let shapes = svg.selectAll("g." + classPrefix + "cell " + shape).data(type.data);
let shapes = svg.selectAll("g." + classPrefix + "cell " + shape + "." + classPrefix + "swatch").data(type.data);

//add event handlers
helper.d3_addEvents(cellEnter, legendDispatcher);
Expand Down
2 changes: 1 addition & 1 deletion src/size.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function size() {
.attr("class", classPrefix + "cell")
cellEnter.append(shape).attr("class", classPrefix + "swatch")

let shapes = svg.selectAll("g." + classPrefix + "cell " + shape)
let shapes = svg.selectAll("g." + classPrefix + "cell " + shape + "." + classPrefix + "swatch")

//add event handlers
helper.d3_addEvents(cellEnter, legendDispatcher)
Expand Down
2 changes: 1 addition & 1 deletion src/symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function symbol() {
.attr("class", classPrefix + "cell")
cellEnter.append(shape).attr("class", classPrefix + "swatch")

let shapes = svg.selectAll("g." + classPrefix + "cell " + shape)
let shapes = svg.selectAll("g." + classPrefix + "cell " + shape + "." + classPrefix + "swatch")

//add event handlers
helper.d3_addEvents(cellEnter, legendDispatcher)
Expand Down

0 comments on commit 7e0eb71

Please sign in to comment.