Resizable aspectratio bug?
I'm having a problem where if I set a div to be resizable with the aspectRatio set to true and contained in another div. If I drag past the north/south west side of the container div the inner div simply shrinks to zero.
Dragging straight west will break containment but won't shrink the div.
Here is a simple demonstration:
- <div id="container" style="height:600px;width:600px;">
- <div id="inner" style="height:100px;width:100px;background-color:black;"></div>
- <div>
- <script>
- $(document).ready(function() {
- $("inner").draggable({
- containment: $("#container")
- })
- .resizable({
- containment: $("#container"),
- aspectRatio: true,
- handles: "all",
- minHeight: 100,
- minWidth: 100
- });
- });
- </script>
I've tried this in Chrome & IE on windows both with the same results. If I remove the aspectRatio option the problem goes away.
Am I doing something wrong here? Or is this truly a bug?