enhance(view):调整宽高的计算取整,消除可能存在的黑线。
This commit is contained in:
		| @@ -20,7 +20,7 @@ export const ContinuationView: FC = () => { | |||||||
|     }, |     }, | ||||||
|     [files] |     [files] | ||||||
|   ); |   ); | ||||||
|   const maxImageWidth = useMemo(() => viewWidth * (zoom / 100), [viewWidth, zoom]); |   const maxImageWidth = useMemo(() => Math.floor(viewWidth * (zoom / 100)), [viewWidth, zoom]); | ||||||
|  |  | ||||||
|   useEffect(() => { |   useEffect(() => { | ||||||
|     ebus?.addListener('navigate_offset', ({ filename }) => { |     ebus?.addListener('navigate_offset', ({ filename }) => { | ||||||
| @@ -59,7 +59,7 @@ export const ContinuationView: FC = () => { | |||||||
|                 justifyContent: 'center', |                 justifyContent: 'center', | ||||||
|                 alignItems: 'flex-start', |                 alignItems: 'flex-start', | ||||||
|                 width: '100%', |                 width: '100%', | ||||||
|                 height: files[index].height * (maxImageWidth / files[index].width) |                 height: Math.round(files[index].height * (maxImageWidth / files[index].width)) | ||||||
|               }} |               }} | ||||||
|             > |             > | ||||||
|               <img src={files[index].path} style={{ width: maxImageWidth }} /> |               <img src={files[index].path} style={{ width: maxImageWidth }} /> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user