Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(zoom): offer 3D Orbit with the cursor hidden when the focus is manual
EtienneLescot97b15c0f3075
diff --git a/src/components/ai-edition/v4/FloatingInspector.test.tsx b/src/components/ai-edition/v4/FloatingInspector.test.tsxindex 8173f1f51..422cfabf3 100644--- a/src/components/ai-edition/v4/FloatingInspector.test.tsx+++ b/src/components/ai-edition/v4/FloatingInspector.test.tsx@@ -251,19 +251,25 @@ describe("FloatingInspector", () => {}});- it("offers no cursor-driven camera while the cursor is hidden, unless already picked", () => {+ it("offers the orbit with the cursor hidden only where the focus point poses it, or once picked", () => {editorSettings.cursorShow = false;- try {- const moving = () =>- screen.queryByRole("button", { name: "settings.zoom.camera.preset.orbit" });- const { tl } = zoomTl({});- const { unmount } = render(<FloatingInspector {...defaultProps} tl={tl} />);- expect(moving()).toBeNull();+ const offered = (region: Record<string, unknown>) => {+ const { unmount } = render(<FloatingInspector {...defaultProps} tl={zoomTl(region).tl} />);+ const orbit = screen.queryByRole("button", { name: "settings.zoom.camera.preset.orbit" });unmount();- render(<FloatingInspector {...defaultProps} tl={zoomTl({ rotationPreset: "orbit" }).tl} />);- expect(moving()).not.toBeNull();+ return orbit !== null;+ };+ try {+ expect(offered({ focusMode: "auto" })).toBe(false);+ expect(offered({ focusMode: "manual" })).toBe(true);+ expect(offered({})).toBe(true);+ expect(offered({ focusMode: "auto", rotationPreset: "orbit" })).toBe(true);+ // The timeline's Auto-Focus makes every zoom auto, whatever it stores.+ editorSettings.autoFocusAll = true;+ expect(offered({ focusMode: "manual" })).toBe(false);} finally {editorSettings.cursorShow = true;+ editorSettings.autoFocusAll = false;}});});diff --git a/src/components/ai-edition/v4/FloatingInspector.tsx b/src/components/ai-edition/v4/FloatingInspector.tsxindex 282384bda..458664003 100644--- a/src/components/ai-edition/v4/FloatingInspector.tsx+++ b/src/components/ai-edition/v4/FloatingInspector.tsx@@ -815,10 +815,13 @@ function SelectionPane({ tl, onClose }: { tl: TimelineApi; onClose: () => void }tilesoptions={["off" as const,- // The orbit follows the cursor under auto focus, the default for a new zoom,- // and a hidden cursor drives nothing: not offered then, rather than a camera- // that silently holds still. Still listed once picked, so the row can show it.- ...(settings.cursorShow || region.rotationPreset === "orbit"+ // The orbit follows the cursor under auto focus, and a hidden cursor drives+ // nothing: not offered then, rather than a camera that silently holds still.+ // Under manual focus the focus point poses it, cursor or not. Still listed+ // once picked, so the row can show it.+ ...(settings.cursorShow ||+ (!autoFocusAll && (region.focusMode ?? "manual") === "manual") ||+ region.rotationPreset === "orbit"? MOVING_ROTATION_3D_PRESETS: []),...FIXED_ROTATION_3D_PRESETS,