1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Minor fixes according to DeepScan

This commit is contained in:
Zhiyuan Zheng
2021-03-09 01:17:07 +01:00
parent f127fc3a1a
commit e1e4aace78
9 changed files with 17 additions and 26 deletions

View File

@@ -42,17 +42,17 @@ const ComposeEditAttachmentImage: React.FC<Props> = ({ index, focus }) => {
width: imageWidthBase,
height:
imageWidthBase /
((theAttachmentRemote as Mastodon.AttachmentImage).meta?.original
((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.original
?.aspect || 1)
}
const panX = useSharedValue(
(((theAttachmentRemote as Mastodon.AttachmentImage).meta?.focus?.x || 0) *
(((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.focus?.x || 0) *
imageDimensionis.width) /
2
)
const panY = useSharedValue(
(((theAttachmentRemote as Mastodon.AttachmentImage).meta?.focus?.y || 0) *
(((theAttachmentRemote as Mastodon.AttachmentImage)?.meta?.focus?.y || 0) *
imageDimensionis.height) /
2
)