Image paintedWidth and paintedHeight not updating
GuyInCorner opened this issue · 0 comments
GuyInCorner commented
It looks like Image paintedWidth and paintedHeight are calculated once upon load and then never updated. I would have expected them to update as things change.
I put this (pseudo code) in my instantiated Image as a work around. Something like it put into the Image component may be in order.
onWidthChanged,
onHeightChanged: {
if(imgAreaRatio > srcRatio) {
// height constrained
paintedWidth = srcRatio * height;
paintedHeight = height;
} else {
// width constrained
paintedWidth = width;
paintedHeight = width/srcRatio;
}
}_