mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Added resizable test for wrapped elements
This commit is contained in:
parent
5e6ef44bb4
commit
0a279c243d
BIN
ui/tests/images/test.jpg
Normal file
BIN
ui/tests/images/test.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 915 B |
@ -32,6 +32,7 @@
|
||||
|
||||
<div id="main" style="border: 1px solid black; padding: 10px; margin: 10px;">
|
||||
<div id='resizable1' style="background: green; width: 100px; height: 100px;">I'm a resizable.</div>
|
||||
<img src="images/test.jpg" id='resizable2' style="width: 100px; height: 100px;"/>
|
||||
</div>
|
||||
|
||||
<ol id="tests"></ol>
|
||||
|
@ -379,5 +379,22 @@ test("ui-resizable-se { handles: 'all', grid: [0, 20] }", function() {
|
||||
equals( target.width(), 118, "compare width");
|
||||
equals( target.height(), 120, "compare height");
|
||||
|
||||
});
|
||||
|
||||
test("ui-resizable-se { handles: 'all', grid: [0, 20] } wrapped", function() {
|
||||
|
||||
var handle = '.ui-resizable-se', target = $('#resizable2').resizable({ handles: 'all', grid: [0, 20] });
|
||||
|
||||
expect(4);
|
||||
|
||||
drag(handle, 3, 9);
|
||||
|
||||
equals( target.width(), 103, "compare width");
|
||||
equals( target.height(), 100, "compare height");
|
||||
|
||||
drag(handle, 15, 11);
|
||||
|
||||
equals( target.width(), 118, "compare width");
|
||||
equals( target.height(), 120, "compare height");
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user