Skip to content

Commit

Permalink
Fix error with mouse events caused by column label canvas
Browse files Browse the repository at this point in the history
Signed-off-by: Abeshouse, Adam A./Sloan Kettering Institute <abeshoua@mskcc.org>
  • Loading branch information
Abeshouse, Adam A./Sloan Kettering Institute authored and onursumer committed May 20, 2022
1 parent 9564915 commit 438b842
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/oncoprintjs/src/js/oncoprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ export default class Oncoprint {
.attr({'width':'0px', 'height':'0px'})
.css({'position':'absolute',
'top':'0px',
'left':'0px'})
'left':'0px',
'pointer-events':'none' // since column label canvas is on top of cell overlay canvas, we need to make it not capture any mouse events
})
.addClass("noselect")
.addClass('oncoprintjs__column_label_canvas') as JQuery<HTMLCanvasElement>;

Expand Down Expand Up @@ -214,7 +216,7 @@ export default class Oncoprint {

$cell_canvas.appendTo($cell_div);
$cell_overlay_canvas.appendTo($cell_div);
$column_label_canvas.appendTo($cell_div);
$column_label_canvas.appendTo($cell_div);// column labels should show above the overlay canvas because the text should show over the highlights
$dummy_scroll_div.appendTo($cell_div);
$dummy_scroll_div.on("mousemove mousedown mouseup", function(evt) {
$cell_overlay_canvas.trigger(evt);
Expand Down

0 comments on commit 438b842

Please sign in to comment.