Skip to content

Commit 3b9a73b

Browse files
committed
Disable resize request for very small sizes
This was causing the matplotlib rendered to stop rendering. Signed-off-by: martinRenou <[email protected]>
1 parent 0e44d4c commit 3b9a73b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/src/mpl_widget.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ var MPLCanvasModel = widgets.DOMWidgetModel.extend({
110110
},
111111

112112
resize: function(width, height) {
113+
// Do not request a super small size, as it seems to break the back-end
114+
if (width <= 5 || height <= 5) {
115+
return;
116+
}
117+
113118
this._for_each_view(function(view) {
114119
// Do an initial resize of each view, stretching the old canvas.
115120
view.resize_canvas(width, height);

0 commit comments

Comments
 (0)