zoom to fit on between projects tauri fix (#2504)

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* triiger

* make better

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* empty

* fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2024-05-24 12:32:15 -07:00
committed by GitHub
parent 1db3e1b5e4
commit 4cb6ceb043
12 changed files with 79 additions and 53 deletions

View File

@ -1136,22 +1136,6 @@ export class EngineCommandManager {
this.resolveReady()
setIsStreamReady(true)
await executeCode()
await this.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: {
type: 'zoom_to_fit',
object_ids: [], // leave empty to zoom to all objects
padding: 0.1, // padding around the objects
},
})
// make sure client camera syncs after zoom to fit since zoom to fit doesn't return camera settings
// TODO: https://github.com/KittyCAD/engine/issues/2098
await this.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: { type: 'default_camera_get_settings' },
})
})
},
onClose: () => {