一键生成继电器图的画布自动变大

This commit is contained in:
joylink_zhaoerwei 2023-12-06 13:25:06 +08:00
parent 3a82d347e4
commit c47bea57ce

View File

@ -118,4 +118,8 @@ export function generateRelayLayout(relays: GenerateRelaysCongig[]) {
); );
} }
} }
const canvasWidth =
relayCabinet[relayCabinet.length - 1].position.x + relayCabinetConsts.width;
relayCabinetStore.getJlCanvas().properties.width =
canvasWidth > 1920 ? canvasWidth : 1920;
} }