| undefined\n const observer = new ResizeObserver(() => {\n // This is called initially too, not just on resize\n sceneInfra.onCanvasResized()\n sceneInfra.camControls.onWindowResize()\n sceneEntitiesManager.onCamChange().catch(reportRejection)\n\n clearTimeout(fitAfterResizeTimer)\n fitAfterResizeTimer = setTimeout(() => {\n if (kclManager.artifactGraph.size === 0) return\n engineStreamZoomToFit({\n engineCommandManager,\n padding: 0.35,\n }).catch(reportRejection)\n }, 180)\n })\n observer.observe(container)`
+ );
+ replaceSource(
+ "src/clientSideScene/ClientSideSceneComp.tsx",
+ ` observer.disconnect()\n media.removeEventListener('change', handleChange)`,
+ ` observer.disconnect()\n clearTimeout(fitAfterResizeTimer)\n media.removeEventListener('change', handleChange)`
+ );
replaceSource(
"src/routes/Onboarding/utils.tsx",
`
diff --git a/vendor/zoo-modeling-app/FitAllButton.tsx.template b/vendor/zoo-modeling-app/FitAllButton.tsx.template
new file mode 100644
index 000000000..6df9b1da4
--- /dev/null
+++ b/vendor/zoo-modeling-app/FitAllButton.tsx.template
@@ -0,0 +1,32 @@
+import { CustomIcon } from '@src/components/CustomIcon'
+import Tooltip from '@src/components/Tooltip'
+import { useSingletons } from '@src/lib/boot'
+import { reportRejection } from '@src/lib/trap'
+import { engineStreamZoomToFit } from '@src/lib/utils'
+
+export const HICAD_CAMERA_FIT_PADDING = 0.35
+
+export function FitAllButton() {
+ const { kclManager } = useSingletons()
+
+ return (
+
+ )
+}
diff --git a/vendor/zoo-modeling-app/localization.ts b/vendor/zoo-modeling-app/localization.ts
index 375d7497b..7d8782b22 100644
--- a/vendor/zoo-modeling-app/localization.ts
+++ b/vendor/zoo-modeling-app/localization.ts
@@ -35,6 +35,7 @@ const translations = new Map([
['Export part', '导出零件'],
['Extrude', '拉伸'],
['Feature Tree', '特征树'],
+ ['Fit all model', '显示全部模型'],
['Fillet', '圆角'],
['Flip Surface', '翻转曲面'],
['Front plane', '前视基准面'],
@@ -102,6 +103,7 @@ const translations = new Map([
'HiCAD AI 可能出错。我们会发送选区上下文以提高准确性,请始终核对结果。',
],
['Zoom to fit', '缩放至合适大小'],
+ ['Reset view', '重置视图'],
['loading', '加载中'],
['zoo.dev', 'HiCAD 云端'],
])