mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
fixing imageAsset render
This commit is contained in:
parent
8f8c2f30ae
commit
0451e9e60d
@ -9,8 +9,8 @@ export function useImageAsset(topicId, asset) {
|
|||||||
frameWidth: 1,
|
frameWidth: 1,
|
||||||
frameHeight: 1,
|
frameHeight: 1,
|
||||||
imageRatio: 1,
|
imageRatio: 1,
|
||||||
imageWidth: 128,
|
imageWidth: 1,
|
||||||
imageHeight: 128,
|
imageHeight: 1,
|
||||||
url: null,
|
url: null,
|
||||||
loaded: false,
|
loaded: false,
|
||||||
failed: false,
|
failed: false,
|
||||||
@ -39,7 +39,7 @@ export function useImageAsset(topicId, asset) {
|
|||||||
updateState({ imageWidth: width, imageHeight: height });
|
updateState({ imageWidth: width, imageHeight: height });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [state.frameWidth, state.frameHeight, state.imageRatio]);
|
}, [state.frameWidth, state.frameHeight, state.imageRatio, state.loaded]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
updateState({ frameWidth: dimensions.width, frameHeight: dimensions.height });
|
updateState({ frameWidth: dimensions.width, frameHeight: dimensions.height });
|
||||||
|
Loading…
Reference in New Issue
Block a user