After removing the 'alsoResize' option, I found that the behavior remains unchanged.
Upon resizing the main element, I noticed that the black border of the bottom element, 'marquee,' often shifts out of alignment with the dashed white border of the top element.
$(".layer").resizable({
//alsoResize: '.marquee',
resize: function(event, ui) {
$('.marquee').css({
width : ui.size.width + "px",
height : ui.size.height + "px",
left : ui.position.left + "px",
top : ui.position.top + "px",
});
},
handles: 'all',
aspectRatio: true,
});
http://jsfiddle.net/digitaloutback/uGr3w/3/
When inspecting with Firebug on a local demo, I observed that when they go out of line, the inline styles for left, top, width, and height are different.
I'm considering whether a solution would involve sending position and size statistics to a function that will provide precise measurements to both elements. Are there any simpler alternatives? Thank you.
UPDATE:
I have developed a clean workaround... by passing the dimensions calculated by resizable to a function that sets the top layer to these same dimensions.
I believe there may be a more efficient way to achieve this, so please feel free to suggest an optimized version...