From bbd66f4e2d3c6e658cf404a3c66a5390212f65ca Mon Sep 17 00:00:00 2001 From: martinRenou Date: Fri, 5 Jul 2019 09:06:37 +0200 Subject: [PATCH] Fix rubberband on Firefox --- js/src/mpl_widget.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/src/mpl_widget.js b/js/src/mpl_widget.js index fb399eb0..5da3773b 100644 --- a/js/src/mpl_widget.js +++ b/js/src/mpl_widget.js @@ -226,10 +226,8 @@ var MPLCanvasView = widgets.DOMWidgetView.extend({ this.canvas.setAttribute('height', height * this.ratio); this.canvas.style.width = width + 'px'; - this.rubberband_canvas.setAttribute('width', width * this.ratio); - this.rubberband_canvas.setAttribute('height', height * this.ratio); - this.rubberband_canvas.style.height = height + 'px'; - this.rubberband_canvas.style.height = height + 'px'; + this.rubberband_canvas.setAttribute('width', width); + this.rubberband_canvas.setAttribute('height', height); }, send_message: function(type, message = {}) {