Skip to content

Commit

Permalink
[ML] Fixes a regression where clicking on a swimlane cell would no lo…
Browse files Browse the repository at this point in the history
…nger work.
  • Loading branch information
walterra committed Aug 22, 2019
1 parent 9221622 commit c9a870b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions x-pack/legacy/plugins/ml/public/explorer/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -903,15 +903,21 @@ export const Explorer = injectI18n(injectObservablesAsProps(
});
};

isSwimlaneSelectActive = false;
onSwimlaneEnterHandler = () => this.setSwimlaneSelectActive(true);
onSwimlaneLeaveHandler = () => this.setSwimlaneSelectActive(false);
setSwimlaneSelectActive = (active) => {
if (!active && this.disableDragSelectOnMouseLeave) {
this.dragSelect.clearSelection();
if (this.isSwimlaneSelectActive && !active && this.disableDragSelectOnMouseLeave) {
this.dragSelect.stop();
this.isSwimlaneSelectActive = active;
return;
}
this.dragSelect.start();
if (!this.isSwimlaneSelectActive && active) {
this.dragSelect.start();
this.dragSelect.clearSelection();
this.dragSelect.setSelectables(document.getElementsByClassName('sl-cell'));
this.isSwimlaneSelectActive = active;
}
};

// This queue tracks click events while the swimlanes are loading.
Expand Down

0 comments on commit c9a870b

Please sign in to comment.