Skip to content

Commit

Permalink
[fix] exported image has a thin white bar at the bottom (#2241)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
  • Loading branch information
igorDykhta committed Jun 9, 2023
1 parent f562fbe commit 88dd4b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/src/plot-container.tsx
Expand Up @@ -159,7 +159,12 @@ export default function PlotContainerFactory(

_retrieveNewScreenshot = () => {
if (this.plottingAreaRef.current) {
convertToPng(this.plottingAreaRef.current, {filter: DOM_FILTER_FUNC})
const {imageSize} = this.props.exportImageSetting;
convertToPng(this.plottingAreaRef.current, {
filter: DOM_FILTER_FUNC,
width: imageSize.imageW,
height: imageSize.imageH
})
.then(this.props.setExportImageDataUri)
.catch(err => {
this.props.setExportImageError(err);
Expand Down

0 comments on commit 88dd4b3

Please sign in to comment.