Skip to content

Commit 6577876

Browse files
authored
Merge pull request #187 from martinRenou/disable_small_size_request
Disable resize request for very small sizes
2 parents 0e44d4c + 3b9a73b commit 6577876

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)