drag(handle, 50);
- equals( target.width(), 149, "compare width");
+ equals( target.width(), 150, "compare width");
drag(handle, -50);
drag(handle, -50);
- equals( target.width(), 149, "compare width" );
+ equals( target.width(), 150, "compare width" );
drag(handle, 50);
drag(handle, 0, -50);
- equals( target.height(), 149, "compare height" );
+ equals( target.height(), 150, "compare height" );
drag(handle, 0, 50);
drag(handle, 0, 50);
- equals( target.height(), 149, "compare height" );
+ equals( target.height(), 150, "compare height" );
drag(handle, 0, -50);
drag(handle, 50, 50);
- equals( target.width(), 149, "compare width" );
- equals( target.height(), 149, "compare height" );
+ equals( target.width(), 150, "compare width" );
+ equals( target.height(), 150, "compare height" );
drag(handle, -50, -50);
drag(handle, -50, -50);
- equals( target.width(), 149, "compare width" );
- equals( target.height(), 51, "compare height" );
+ equals( target.width(), 150, "compare width" );
+ equals( target.height(), 50, "compare height" );
drag(handle, 50, 50);
drag(handle, -50, -50);
- equals( target.width(), 51, "compare width" );
- equals( target.height(), 149, "compare height" );
+ equals( target.width(), 50, "compare width" );
+ equals( target.height(), 150, "compare height" );
drag(handle, 50, 50);
drag(handle, -50, -50);
- equals( target.width(), 149, "compare width" );
- equals( target.height(), 149, "compare height" );
+ equals( target.width(), 150, "compare width" );
+ equals( target.height(), 150, "compare height" );
drag(handle, 50, 50);
drag(handle, 80);
- equals( target.width(), 150, "compare maxWidth");
+ equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
drag(handle, -130);
drag(handle, -80);
- equals( target.width(), 150, "compare maxWidth");
+ equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
drag(handle, 130);
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, 0, 130);
+ drag(handle, 0, 80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
-
+ equals( target.height(), 70, "compare minHeight");
+
});
test("ui-resizable-s { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, 0, -130);
+ drag(handle, 0, -80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
+ equals( target.height(), 70, "compare minHeight");
});
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, -130, -130);
+ drag(handle, -80, -80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
+ equals( target.height(), 70, "compare minHeight");
});
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, 130, -130);
+ drag(handle, 80, -80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
+ equals( target.height(), 70, "compare minHeight");
});
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, -130, 130);
+ drag(handle, -80, 80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
+ equals( target.height(), 70, "compare minHeight");
});
module("Options");
-test("ui-resizable-se { handles: 'all', grid: [20, 20] }", function() {
+test("ui-resizable-se { handles: 'all', grid: [0, 20] }", function() {
- var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [20, 20] });
+ var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [0, 20] });
expect(4);
- drag(handle, 10, 10);
+ drag(handle, 3, 9);
- equals( target.width(), 100, "compare width");
+ equals( target.width(), 103, "compare width");
equals( target.height(), 100, "compare height");
- drag(handle, 30, 30);
+ drag(handle, 15, 11);
- equals( target.width(), 120, "compare width");
+ equals( target.width(), 118, "compare width");
equals( target.height(), 120, "compare height");