aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/resizable
diff options
context:
space:
mode:
authorKris Borchers <kris.borchers@gmail.com>2013-11-08 22:45:36 -0600
committerScott González <scott.gonzalez@gmail.com>2014-01-15 04:37:32 -0500
commit20c1648f68660b267eec302d43a7b1014cda6e1a (patch)
tree8f22bf5c458d182543996a7983bddfb7db3d9616 /tests/unit/resizable
parent7741c9f678088a129c1782f4e7f061bc12a41279 (diff)
downloadjquery-ui-20c1648f68660b267eec302d43a7b1014cda6e1a.tar.gz
jquery-ui-20c1648f68660b267eec302d43a7b1014cda6e1a.zip
Resizable: Only resize/reposition if size is greater than specified grid
Fixes #9611 Closes gh-1132
Diffstat (limited to 'tests/unit/resizable')
-rw-r--r--tests/unit/resizable/resizable_options.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/unit/resizable/resizable_options.js b/tests/unit/resizable/resizable_options.js
index 8da189d96..34fef47f0 100644
--- a/tests/unit/resizable/resizable_options.js
+++ b/tests/unit/resizable/resizable_options.js
@@ -224,6 +224,29 @@ test("grid (wrapped)", function() {
equal( target.height(), 120, "compare height");
});
+test( "grid - Resizable: can be moved when grid option is set (#9611)", function() {
+ expect( 6 );
+
+ var oldPosition,
+ handle = ".ui-resizable-nw",
+ target = $( "#resizable1" ).resizable({
+ handles: "all",
+ grid: 50
+ });
+
+ TestHelpers.resizable.drag( handle, 50, 50 );
+ equal( target.width(), 50, "compare width" );
+ equal( target.height(), 50, "compare height" );
+
+ oldPosition = target.position();
+
+ TestHelpers.resizable.drag( handle, 50, 50 );
+ equal( target.width(), 50, "compare width" );
+ equal( target.height(), 50, "compare height" );
+ equal( target.position().top, oldPosition.top, "compare top" );
+ equal( target.position().left, oldPosition.left, "compare left" );
+});
+
test("ui-resizable-se { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
expect(4);