Skip to content

Commit

Permalink
Send mode.name to BrushEvent instead of mode object
Browse files Browse the repository at this point in the history
  • Loading branch information
woutervh- committed Aug 21, 2020
1 parent 509bd25 commit 3b5c882
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/brush.js
Expand Up @@ -391,7 +391,7 @@ function brush(dim) {
nopropagation();
interrupt(that);
redraw.call(that);
emit.start(mode);
emit.start(mode.name);

function moved() {
var point1 = pointer(that);
Expand Down Expand Up @@ -456,7 +456,7 @@ function brush(dim) {
|| selection[1][1] !== s1) {
state.selection = [[w1, n1], [e1, s1]];
redraw.call(that);
emit.brush(mode);
emit.brush(mode.name);
}
}

Expand All @@ -474,7 +474,7 @@ function brush(dim) {
overlay.attr("cursor", cursors.overlay);
if (state.selection) selection = state.selection; // May be set by brush.move (on start)!
if (empty(selection)) state.selection = null, redraw.call(that);
emit.end(mode);
emit.end(mode.name);
}

function keydowned() {
Expand Down

0 comments on commit 3b5c882

Please sign in to comment.