Change png size to be based on browser

This commit is contained in:
Paulo Gustavo Veiga 2022-02-15 14:04:06 -08:00
parent e4d43013d1
commit 6ecfa0139b

View File

@ -17,7 +17,6 @@ import { activeInstance } from '../../../../redux/clientSlice';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import SizeType from '@wisemapping/mindplot/src/components/SizeType'; import SizeType from '@wisemapping/mindplot/src/components/SizeType';
import Checkbox from '@mui/material/Checkbox'; import Checkbox from '@mui/material/Checkbox';
import FormGroup from '@mui/material/FormGroup';
type ExportFormat = 'svg' | 'jpg' | 'png' | 'txt' | 'mm' | 'wxml' | 'xls' | 'md'; type ExportFormat = 'svg' | 'jpg' | 'png' | 'txt' | 'mm' | 'wxml' | 'xls' | 'md';
type ExportGroup = 'image' | 'document' | 'mindmap-tool'; type ExportGroup = 'image' | 'document' | 'mindmap-tool';
@ -95,7 +94,7 @@ const ExportDialog = ({
// Depending on the type of export. It will require differt POST. // Depending on the type of export. It will require differt POST.
const workspace = designer.getWorkSpace(); const workspace = designer.getWorkSpace();
svgElement = workspace.getSVGElement(); svgElement = workspace.getSVGElement();
size = workspace.getSize(); size = { width: window.innerWidth, height: window.innerHeight };
mindmap = designer.getMindmap(); mindmap = designer.getMindmap();
} else { } else {
mindmap = client.fetchMindmap(mapId); mindmap = client.fetchMindmap(mapId);