no prev/next anymore

This commit is contained in:
2025-11-16 21:25:39 +01:00
parent 1f2c62241c
commit fa6b4b94f6
8 changed files with 35 additions and 278 deletions
+4 -18
View File
@@ -46,14 +46,8 @@ export interface DeskDocument {
interface NavigatorSnapshot {
url: string | null;
alt?: string | null;
canGoPrev?: boolean;
canGoNext?: boolean;
goPrev?: () => void;
goNext?: () => void;
ordinal?: number | null;
width?: number | null;
height?: number | null;
contentType?: string | null;
}
type OverlayOriginHint = {
@@ -71,8 +65,10 @@ interface OverlayOriginTransform {
baseHeight: number;
}
interface OverlayDisplay extends NavigatorSnapshot {
interface OverlayDisplay {
url: string;
alt?: string | null;
contentType?: string | null;
}
interface DocumentSizeInfo {
@@ -380,11 +376,6 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
prevSnapshot &&
prevSnapshot.url === snapshot.url &&
prevSnapshot.alt === snapshot.alt &&
prevSnapshot.canGoPrev === snapshot.canGoPrev &&
prevSnapshot.canGoNext === snapshot.canGoNext &&
prevSnapshot.goPrev === snapshot.goPrev &&
prevSnapshot.goNext === snapshot.goNext &&
prevSnapshot.ordinal === snapshot.ordinal &&
prevSnapshot.width === snapshot.width &&
prevSnapshot.height === snapshot.height;
if (sameSnapshot) {
@@ -672,11 +663,7 @@ const DesktopWorkspace: React.FC<DesktopWorkspaceProps> = ({
if (!overlaySource) {
return null;
}
return {
...overlaySource,
canGoPrev: false,
canGoNext: false,
};
return overlaySource;
}, [overlaySource]);
const overlayDocument = useMemo<DeskDocument | null>(() => {
@@ -1122,7 +1109,6 @@ function DesktopWorkspaceView({
</div>
<PreviewZoomOverlay
open={Boolean(overlayDisplay?.url)}
display={overlayDisplay}
onClose={closeOverlay}
document={overlayDocument}
originRect={overlayOriginRect}