Open Lopliok opened 1 year ago
Indeed, having all the conditions tied together doesn't seem right. Most of else should be removed I think.
By the way, why are you using cropSize
instead of aspect
?
I made some local patch for our case, but if i will have time i'll will try investigate how can be helpful aspect.
Describe the bug When property cropSize is changed in same time as zoom, computeSizes is not called. So state of cropSize is not updated.
Expected behavior If property cropSize has changed, it will update Resizer state cropSize
We are using onMediaLoaded callback to calculate zoom and cropSize. Also we use range sliders to manipulate width, height, zoom.
I tried move condition in componentDidUpdate to be separately and called everytime when cropSize changed and it helps. Should I create PR for this?