size constraints take precedence over aspect ratio
Thanks for opening an issue!
Please select the type of issue you're reporting. For questions.
- [x] Bug
- [ ] Feature Request
- [ ] Question
Problem Report
When you specify both min/max constraints and lockAspectRatio and the constraints are not in the aspect ratio then you can resize the pane to the wrong aspect. That's to say: you can always resize in the full constraint range even if this violates the aspect ratio constraint. I think intuitively the aspect ratio should always be obeyed even this limits the resizeable range.
In my use case the initial width/height is computed based on the data being displayed (an image) whereas the min/max are computed based on the available space so the min/max will not be in the same ratio. Of course I could manually recalculate min/max such that it has the same ratio but it would be cleaner if react-resizable did that for me.
System Info
Node Version: 6.5 Browser: electron 1.4.3 OS: Windows
Just came across this behavior -- any plans to address this issue? Accepting PRs?
+1
+1
Ok - so set your constraints to match the ratio, or, if this is a huge issue for you that you can compellingly advocate for, open a PR please.