From bb0511e8be6545d2b757b91932c51bda88431525 Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Fri, 9 Oct 2020 16:12:44 -0400 Subject: [PATCH] Default to using rendered height/width in toImage --- src/plot_api/to_image.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plot_api/to_image.js b/src/plot_api/to_image.js index 11491416f01..a9af220d2c3 100644 --- a/src/plot_api/to_image.js +++ b/src/plot_api/to_image.js @@ -142,12 +142,12 @@ function toImage(gd, opts) { var layoutImage = Lib.extendFlat({}, layout); if(width) { layoutImage.width = width; - } else if(opts.width === null && isNumeric(fullLayout.width)) { + } else if(opts.width == null && isNumeric(fullLayout.width)) { layoutImage.width = fullLayout.width; } if(height) { layoutImage.height = height; - } else if(opts.height === null && isNumeric(fullLayout.height)) { + } else if(opts.height == null && isNumeric(fullLayout.height)) { layoutImage.height = fullLayout.height; }