Skip to content

Commit

Permalink
feat(web): remove attempt to refresh view
Browse files Browse the repository at this point in the history
  • Loading branch information
zdimension committed Aug 14, 2024
1 parent 8d40bf0 commit b506ec6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
export let asset: AssetResponseDto;
export let onAction: OnAction;
export let onSetRotation: (rotation: number) => void;
export let to: 'left' | 'right';
let angle = 0;

Check warning on line 19 in web/src/lib/components/asset-viewer/actions/rotate-action.svelte

View workflow job for this annotation

GitHub Actions / Web

'angle' is assigned a value but never used. Allowed unused vars must match /^_$/u
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
export let onPlaySlideshow: () => void;
export let onShowDetail: () => void;
export let onClose: () => void;
export let onSetRotation: (rotation: number) => void;
const sharedLink = getSharedLink();
Expand Down Expand Up @@ -120,8 +119,8 @@

{#if isOwner}
{#if !asset.isTrashed}
<RotateAction {asset} {onAction} {onSetRotation} to="left" />
<RotateAction {asset} {onAction} {onSetRotation} to="right" />
<RotateAction {asset} {onAction} to="left" />
<RotateAction {asset} {onAction} to="right" />
{/if}
{#if hasStackChildren}
<UnstackAction {stackedAssets} {onAction} />
Expand Down
12 changes: 1 addition & 11 deletions web/src/lib/components/asset-viewer/asset-viewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
let unsubscribes: (() => void)[] = [];
let zoomToggle = () => void 0;
let copyImage: () => Promise<void>;
let setRotation = (_: number) => void 0;
$: isFullScreen = fullscreenElement !== null;
Expand Down Expand Up @@ -410,7 +409,6 @@
onPlaySlideshow={() => ($slideshowState = SlideshowState.PlaySlideshow)}
onShowDetail={toggleDetailPanel}
onClose={closeViewer}
onSetRotation={setRotation}
>
<MotionPhotoAction
slot="motion-photo"
Expand Down Expand Up @@ -490,15 +488,7 @@
.endsWith('.insp'))}
<PanoramaViewer {asset} />
{:else}
<PhotoViewer
bind:zoomToggle
bind:copyImage
bind:setRotation
{asset}
{preloadAssets}
on:close={closeViewer}
{sharedLink}
/>
<PhotoViewer bind:zoomToggle bind:copyImage {asset} {preloadAssets} on:close={closeViewer} {sharedLink} />
{/if}
{:else}
<VideoViewer
Expand Down
8 changes: 0 additions & 8 deletions web/src/lib/components/asset-viewer/photo-viewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
export let sharedLink: SharedLinkResponseDto | undefined = undefined;
export let copyImage: (() => Promise<void>) | null = null;
export let zoomToggle: (() => void) | null = null;
export let setRotation: ((rotation: number) => void) | null = null;
const { slideshowState, slideshowLook } = slideshowStore;
Expand Down Expand Up @@ -102,13 +101,6 @@
$zoomed = $zoomed ? false : true;
};
setRotation = (rotation: number) => {
photoZoomState.update((state) => {
state.currentRotation = rotation;
return state;
});
};
const onCopyShortcut = (event: KeyboardEvent) => {
if (window.getSelection()?.type === 'Range') {
return;
Expand Down

0 comments on commit b506ec6

Please sign in to comment.