Skip to content

Commit e91b20b

Browse files
committed
chore(studio): the zoom change keeps each file's comment share at or under main's
1 parent 21a2934 commit e91b20b

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

‎packages/studio/src/components/nle/NLEPreview.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,10 @@ function isPreviewAtFit(state: PreviewZoomState): boolean {
7979
return isFitZoom(state.zoomPercent) && Math.abs(state.panX) < 0.1 && Math.abs(state.panY) < 0.1;
8080
}
8181

82-
/** Off Fit at the fit scale means the frame was only moved. */
8382
function zoomChipLabel(zoomPercent: number): string {
8483
return isFitZoom(zoomPercent) ? "Panned" : `Zoomed ${Math.round(zoomPercent)}%`;
8584
}
8685

87-
/** The navigator's frame box: the composition's shape, its long side NAVIGATOR_PX. */
8886
function navigatorFrameSize(stage: { width: number; height: number }) {
8987
const ratio = stage.width > 0 && stage.height > 0 ? stage.width / stage.height : 16 / 9;
9088
return ratio >= 1
@@ -167,7 +165,6 @@ export const NLEPreview = memo(function NLEPreview({
167165
const insetPx = fillBox ? 0 : PREVIEW_STAGE_INSET_PX;
168166
const [stageSize, setStageSize] = useState(() => resolvePreviewStageSize(0, 0, null, portrait));
169167

170-
// Every project opens at Fit; a zoom lasts only while the project stays open.
171168
const zoomRef = useRef<PreviewZoomState>(DEFAULT_PREVIEW_ZOOM);
172169
const [settledZoom, setSettledZoom] = useState<PreviewZoomState>(DEFAULT_PREVIEW_ZOOM);
173170
const hudRef = useRef<HTMLDivElement>(null);

‎packages/studio/src/components/nle/previewZoom.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ export interface PreviewVisibleRegion {
170170
height: number;
171171
}
172172

173-
/** The part of the frame the viewport shows, as fractions of the frame; the stage is centred and scaled about its centre. */
174173
export function resolvePreviewVisibleRegion(input: {
175174
state: PreviewZoomState;
176175
viewportWidth: number;

0 commit comments

Comments
 (0)