[x] I agree to follow the Code of Conduct that this project adheres to.
[x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Is your feature request related to a problem? Please describe.
Many applications allow you to do two style of image resize when keeping aspect - "fit in box" and "fill box". This is illustrated by the picture below (there are more options, but these two are basic)
Describe the solution you'd like
It would be nice in addition to have "imageAspect" have "imageFill" style (versus the current "fit"), or something like this. Basically as style for this could be great.
Is your feature request related to a problem? Please describe. Many applications allow you to do two style of image resize when keeping aspect - "fit in box" and "fill box". This is illustrated by the picture below (there are more options, but these two are basic)
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio
FIT (this is supported now)
FILL (this is not supported yet)
Describe the solution you'd like It would be nice in addition to have "imageAspect" have "imageFill" style (versus the current "fit"), or something like this. Basically as style for this could be great.
This needs to go to the basic renderer, I think. For the SVG for example, now it sets "preserveAspectRatio" to "none" or empty (which is equivalaent of "xMidYMid meet", in case this style "fill" it should be "xMidYMid slice". https://github.com/jgraph/mxgraph/blob/693c67a81ed33e0fcffc761c242e9eaafcaeb95a/javascript/src/js/util/mxSvgCanvas2D.js#L1070-L1073
For other renderers (?) this should not be hard to implement either, as it's just switching min scale to max scale basically.