I'm trying to recreate twitter's context menu behaviour for images. Images are usually cropped, and long pressing them grows them to their natural aspect ratio, as large as possible. Here are some examples:
Cropped image before long press. Note how it's basically square
Long pressing it grows it to be full height, and half width.
Here's an example of a wide, short image:
However, previewSize: "STRETCH" seems to just set the preview to the maximum possible size, regardless of the size of the rendered preview.
I can either set the image to maintain it's aspect ratio, like so:
Or I can set it to fill the area, like so:
I'd love if I could set the preview area to respect the aspect ratio of the original image (alternatively, I wouldn't mind passing in an "aspectRatio" prop)
I'm trying to recreate twitter's context menu behaviour for images. Images are usually cropped, and long pressing them grows them to their natural aspect ratio, as large as possible. Here are some examples:
However,
previewSize: "STRETCH"
seems to just set the preview to the maximum possible size, regardless of the size of the rendered preview.I can either set the image to maintain it's aspect ratio, like so:
Or I can set it to fill the area, like so:
I'd love if I could set the preview area to respect the aspect ratio of the original image (alternatively, I wouldn't mind passing in an "aspectRatio" prop)