fix(web): lecteur CBZ/CBR mode vertical — capturer naturalWidth/naturalHeight avant neutralisation de currentTarget par React (régression #37)
This commit is contained in:
@ -217,9 +217,10 @@ export function CbzReader({
|
||||
loading="lazy"
|
||||
style={verticalImageStyle(item.page)}
|
||||
onLoad={(event) => {
|
||||
const { naturalWidth, naturalHeight } = event.currentTarget;
|
||||
setImageSizes((current) => ({
|
||||
...current,
|
||||
[item.page]: { width: event.currentTarget.naturalWidth, height: event.currentTarget.naturalHeight }
|
||||
[item.page]: { width: naturalWidth, height: naturalHeight }
|
||||
}));
|
||||
}}
|
||||
onError={() => setPageError(`Page ${item.page} indisponible.`)}
|
||||
|
||||
Reference in New Issue
Block a user