function resizeLogo(newWidth, newHeight) {
// 修改画布尺寸
if
(posterPage) {
svg_part_copy.setAttribute(
"width"
, widthset);
svg_part_copy.setAttribute(
"height"
, parseFloat(widthset * newHeight / newWidth).toFixed(2));
afterHeight = parseFloat(widthset * newHeight / newWidth).toFixed(2);
}
else
if
(tab_type === 2 && (cutlogo || cutsquare)) {
svg_part_copy.setAttribute(
"viewBox"
, `0 0 ${newWidth} ${newHeight}`);
svg_part_copy.setAttribute(
"width"
, widthset);
svg_part_copy.setAttribute(
"height"
, widthset * newHeight / newWidth);
afterHeight = parseInt(widthset * newHeight / newWidth);
}
else
{
// 普通情况下修改尺寸
svg_part_copy.setAttribute(
"width"
, widthset);
svg_part_copy.setAttribute(
"height"
, parseInt(widthset * conf_list[tab_type].h / conf_list[tab_type].w));
afterHeight = parseInt(widthset * conf_list[tab_type].h / conf_list[tab_type].w);
}
}