Closed farfromrefug closed 10 months ago
Thanks for contributing! Please open an issue first explaining the feature and its main use cases. Then, any future PR will need to add tests.
inside
can only satisfy when the content is smaller than the area.
outside
can only satisfy when the content is larger than the area.
When the content starts smaller than the area and becomes larger after zooming, inside
and outside
cannot fulfill the requirement;
there will also be a problem of content exceeding the area and unable to zoom in or out.
aspectfit
precisely solves this problem.
Apart from aspectfit
, are there any other methods to achieve this?
Thank you.
this creates a new contain mode which is kind of a mix of
outside
andinside
. You can zoom out to see the full view while blocking the panning while zoomed in to the bounds of the view