Skip to content

Commit

Permalink
Fix #18 - handle orphaned gestures.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 2, 2019
1 parent a55f8f8 commit 209ed2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/brush.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ function brush(dim) {
}
}

function emitter(that, args) {
return that.__brush.emitter || new Emitter(that, args);
function emitter(that, args, clean) {
return (!clean && that.__brush.emitter) || new Emitter(that, args);
}

function Emitter(that, args) {
Expand Down Expand Up @@ -340,7 +340,7 @@ function brush(dim) {
lockY,
point0 = mouse(that),
point = point0,
emit = emitter(that, arguments).beforestart();
emit = emitter(that, arguments, true).beforestart();

if (type === "overlay") {
state.selection = selection = [
Expand Down

0 comments on commit 209ed2f

Please # to comment.