From 3b9a73bba1708e5b6331825a4bb3c823846771e7 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Fri, 28 Feb 2020 09:38:29 +0100 Subject: [PATCH] Disable resize request for very small sizes This was causing the matplotlib rendered to stop rendering. Signed-off-by: martinRenou --- js/src/mpl_widget.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/src/mpl_widget.js b/js/src/mpl_widget.js index 4a0270cb..af6d00ee 100644 --- a/js/src/mpl_widget.js +++ b/js/src/mpl_widget.js @@ -110,6 +110,11 @@ var MPLCanvasModel = widgets.DOMWidgetModel.extend({ }, resize: function(width, height) { + // Do not request a super small size, as it seems to break the back-end + if (width <= 5 || height <= 5) { + return; + } + this._for_each_view(function(view) { // Do an initial resize of each view, stretching the old canvas. view.resize_canvas(width, height);