aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2014-07-24 13:32:34 -0400
committerScott González <scott.gonzalez@gmail.com>2014-07-24 16:21:51 -0400
commit5beae72e7773d35d46195a4359cb8f845dfb0f4f (patch)
treecb804302d14059a782df74bb2555ebb5c41c7dec /tests
parent9bb51d308e0a72bc67db948e92345c826a8f724d (diff)
downloadjquery-ui-5beae72e7773d35d46195a4359cb8f845dfb0f4f.tar.gz
jquery-ui-5beae72e7773d35d46195a4359cb8f845dfb0f4f.zip
Resizable: Fix size/position changes in resize event
Fixes #10351 Closes gh-1292
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/resizable/resizable_events.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/resizable/resizable_events.js b/tests/unit/resizable/resizable_events.js
index 18e25bfdf..d3851f72e 100644
--- a/tests/unit/resizable/resizable_events.js
+++ b/tests/unit/resizable/resizable_events.js
@@ -146,6 +146,27 @@ test("resize (grid)", function() {
});
+test( "resize, custom adjustment", function() {
+ expect( 4 );
+
+ var handle = ".ui-resizable-se",
+ element = $( "#resizable1" ).resizable({
+ resize: function( event, ui ) {
+ ui.size.width = 100;
+ ui.size.height = 200;
+ ui.position.left = 300;
+ ui.position.top = 400;
+ }
+ });
+
+ TestHelpers.resizable.drag( handle, 50, 50 );
+
+ equal( element.width(), 100, "resize event can control width" );
+ equal( element.height(), 200, "resize event can control height" );
+ equal( element.position().left, 300, "resize event can control left" );
+ equal( element.position().top, 400, "resize event can control top" );
+});
+
test("stop", function() {
expect(5);