fix-goview-canvas-size
This commit is contained in:
parent
d6732597ab
commit
06b0b88258
@ -791,19 +791,29 @@ export function convertGoViewProjectToScreen(input: GoViewProjectLike | GoViewSt
|
|||||||
project?.editCanvasConfig as GoViewEditCanvasConfigLike | undefined,
|
project?.editCanvasConfig as GoViewEditCanvasConfigLike | undefined,
|
||||||
);
|
);
|
||||||
|
|
||||||
const width =
|
const width = Math.max(
|
||||||
editCanvasConfig?.width ??
|
1,
|
||||||
(input as GoViewProjectLike).canvas?.width ??
|
toNumber(
|
||||||
(input as GoViewProjectLike).width ??
|
editCanvasConfig?.width ??
|
||||||
(data?.width as number | undefined) ??
|
(input as GoViewProjectLike).canvas?.width ??
|
||||||
1920;
|
(input as GoViewProjectLike).width ??
|
||||||
|
(data?.width as number | string | undefined) ??
|
||||||
|
1920,
|
||||||
|
1920,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
const height =
|
const height = Math.max(
|
||||||
editCanvasConfig?.height ??
|
1,
|
||||||
(input as GoViewProjectLike).canvas?.height ??
|
toNumber(
|
||||||
(input as GoViewProjectLike).height ??
|
editCanvasConfig?.height ??
|
||||||
(data?.height as number | undefined) ??
|
(input as GoViewProjectLike).canvas?.height ??
|
||||||
1080;
|
(input as GoViewProjectLike).height ??
|
||||||
|
(data?.height as number | string | undefined) ??
|
||||||
|
1080,
|
||||||
|
1080,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
const name = editCanvasConfig?.projectName ?? 'Imported Project';
|
const name = editCanvasConfig?.projectName ?? 'Imported Project';
|
||||||
const background = editCanvasConfig?.background;
|
const background = editCanvasConfig?.background;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user