File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -459,8 +459,8 @@ const ImagePreview = memo(function ImagePreview({ file }: { file: WorkspaceFileR
459459 const el = containerRef . current
460460 if ( ! el ) return
461461 const onWheel = ( e : WheelEvent ) => {
462+ e . preventDefault ( )
462463 if ( e . ctrlKey || e . metaKey ) {
463- e . preventDefault ( )
464464 setZoom ( ( z ) => clampZoom ( z * ( 1 - e . deltaY * ZOOM_WHEEL_SENSITIVITY ) ) )
465465 } else {
466466 setOffset ( ( o ) => ( { x : o . x - e . deltaX , y : o . y - e . deltaY } ) )
@@ -521,7 +521,10 @@ const ImagePreview = memo(function ImagePreview({ file }: { file: WorkspaceFileR
521521 loading = 'eager'
522522 />
523523 </ div >
524- < div className = 'absolute right-4 bottom-4 flex items-center gap-1 rounded-md border border-[var(--border)] bg-[var(--surface-2)] px-2 py-1 shadow-sm' >
524+ < div
525+ className = 'absolute right-4 bottom-4 flex items-center gap-1 rounded-md border border-[var(--border)] bg-[var(--surface-2)] px-2 py-1 shadow-sm'
526+ onMouseDown = { ( e ) => e . stopPropagation ( ) }
527+ >
525528 < button
526529 type = 'button'
527530 onClick = { zoomOut }
You can’t perform that action at this time.
0 commit comments