2008-06-06 06:34:09 +00:00
|
|
|
/*
|
|
|
|
* resizable tests
|
|
|
|
*/
|
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
var drag = function(el, dx, dy, complete) {
|
2008-05-24 07:07:20 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
// speed = sync -> Drag syncrhonously.
|
|
|
|
// speed = fast|slow -> Drag asyncrhonously - animated.
|
2008-05-24 07:07:20 +00:00
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
return $(el).simulate("drag", {
|
2008-06-02 03:06:09 +00:00
|
|
|
dx: dx||0, dy: dy||0, speed: 'sync', complete: complete
|
2008-05-30 23:36:54 +00:00
|
|
|
});
|
2008-06-02 03:06:09 +00:00
|
|
|
};
|
|
|
|
|
2008-06-07 18:03:19 +00:00
|
|
|
module("resizable");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
test("ui-resizable-e resize x", function() {
|
2008-05-24 07:07:20 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
var handle = '.ui-resizable-e', target = $('#resizable1').resizable({ handles: 'all' });
|
2008-05-30 23:36:54 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
expect(2);
|
2008-05-31 15:54:53 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
drag(handle, 50);
|
2008-05-30 23:36:54 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 150, "compare width");
|
2008-05-30 23:36:54 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
drag(handle, -50);
|
2008-05-30 04:35:54 +00:00
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare width" );
|
2008-05-31 16:26:43 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-w resize x", function() {
|
2008-05-31 16:26:43 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
var handle = '.ui-resizable-w', target = $('#resizable1').resizable({ handles: 'all' });
|
2008-05-31 16:26:43 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
expect(2);
|
2008-05-31 15:54:53 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
drag(handle, -50);
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 150, "compare width" );
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
drag(handle, 50);
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare width" );
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-n resize y", function() {
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
var handle = '.ui-resizable-n', target = $('#resizable1').resizable({ handles: 'all' });
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
expect(2);
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
drag(handle, 0, -50);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.height(), 150, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, 0, 50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.height(), 100, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-s resize y", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-s', target = $('#resizable1').resizable({ handles: 'all' });
|
|
|
|
|
|
|
|
expect(2);
|
|
|
|
|
|
|
|
drag(handle, 0, 50);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.height(), 150, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, 0, -50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.height(), 100, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-se resize xy", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all' });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, 50, 50);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 150, "compare width" );
|
|
|
|
equals( target.height(), 150, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, -50, -50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare width" );
|
|
|
|
equals( target.height(), 100, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-sw resize xy", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-sw', target = $('#resizable1').resizable({ handles: 'all' });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, -50, -50);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 150, "compare width" );
|
|
|
|
equals( target.height(), 50, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, 50, 50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare width" );
|
|
|
|
equals( target.height(), 100, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-ne resize xy", function() {
|
|
|
|
|
2008-06-06 01:39:23 +00:00
|
|
|
var handle = '.ui-resizable-ne', target = $('#resizable1').css({ overflow: 'hidden' }).resizable({ handles: 'all' });
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, -50, -50);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 50, "compare width" );
|
|
|
|
equals( target.height(), 150, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, 50, 50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare width" );
|
|
|
|
equals( target.height(), 100, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-nw resize xy", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-nw', target = $('#resizable1').resizable({ handles: 'all' });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, -50, -50);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 150, "compare width" );
|
|
|
|
equals( target.height(), 150, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, 50, 50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare width" );
|
|
|
|
equals( target.height(), 100, "compare height" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Conditional Resize
|
|
|
|
* min/max Height/Width
|
|
|
|
*/
|
|
|
|
|
2008-06-07 18:03:19 +00:00
|
|
|
module("resizable: Dimensions limit");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
test("ui-resizable-se { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, -50, -50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 60, "compare minWidth" );
|
|
|
|
equals( target.height(), 60, "compare minHeight" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, 70, 70);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare maxWidth" );
|
|
|
|
equals( target.height(), 100, "compare maxHeight" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-sw { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-sw', target = $('#resizable1').resizable({ handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, 50, -50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 60, "compare minWidth" );
|
|
|
|
equals( target.height(), 60, "compare minHeight" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, -70, 70);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare maxWidth" );
|
|
|
|
equals( target.height(), 100, "compare maxHeight" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-ne { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-ne', target = $('#resizable1').resizable({ handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, -50, 50);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 60, "compare minWidth" );
|
|
|
|
equals( target.height(), 60, "compare minHeight" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, 70, -70);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare maxWidth" );
|
|
|
|
equals( target.height(), 100, "compare maxHeight" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-nw { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-nw', target = $('#resizable1').resizable({ handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, 70, 70);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 60, "compare minWidth" );
|
|
|
|
equals( target.height(), 60, "compare minHeight" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, -70, -70);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 100, "compare maxWidth" );
|
|
|
|
equals( target.height(), 100, "compare maxHeight" );
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Respecting ratio resize with dimensions limit
|
|
|
|
*/
|
|
|
|
|
2008-06-07 18:03:19 +00:00
|
|
|
module("resizable: Respecting ratio resize with dimensions limits");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
test("ui-resizable-e { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-e', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, 80);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 130, "compare maxWidth");
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.height(), 130, "compare maxHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, -130);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 70, "compare minWidth");
|
|
|
|
equals( target.height(), 70, "compare minHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-w { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-w', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, -80);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 130, "compare maxWidth");
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.height(), 130, "compare maxHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
drag(handle, 130);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 70, "compare minWidth");
|
|
|
|
equals( target.height(), 70, "compare minHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-n { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-n', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, 0, -80);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 130, "compare maxWidth");
|
|
|
|
equals( target.height(), 130, "compare maxHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
drag(handle, 0, 80);
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 70, "compare minWidth");
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.height(), 70, "compare minHeight");
|
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-s { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-s', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, 0, 80);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 130, "compare maxWidth");
|
|
|
|
equals( target.height(), 130, "compare maxHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
drag(handle, 0, -80);
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 70, "compare minWidth");
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.height(), 70, "compare minHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-se { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, 80, 80);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 130, "compare maxWidth");
|
|
|
|
equals( target.height(), 130, "compare maxHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
drag(handle, -80, -80);
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 70, "compare minWidth");
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.height(), 70, "compare minHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-sw { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-sw', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, -80, 80);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 130, "compare maxWidth");
|
|
|
|
equals( target.height(), 130, "compare maxHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
drag(handle, 80, -80);
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 70, "compare minWidth");
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.height(), 70, "compare minHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("ui-resizable-ne { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
|
|
|
|
|
|
|
|
var handle = '.ui-resizable-ne', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
|
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
|
|
|
drag(handle, 80, -80);
|
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 130, "compare maxWidth");
|
|
|
|
equals( target.height(), 130, "compare maxHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
drag(handle, -80, 80);
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.width(), 70, "compare minWidth");
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.height(), 70, "compare minHeight");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
2008-06-07 18:03:19 +00:00
|
|
|
module("resizable: Options");
|
2008-06-03 19:59:41 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
test("ui-resizable-se { handles: 'all', grid: [0, 20] }", function() {
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [0, 20] });
|
2008-06-02 03:06:09 +00:00
|
|
|
|
|
|
|
expect(4);
|
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
drag(handle, 3, 9);
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 103, "compare width");
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.height(), 100, "compare height");
|
2008-06-02 03:06:09 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
drag(handle, 15, 11);
|
2008-06-03 19:59:41 +00:00
|
|
|
|
2008-06-05 12:43:09 +00:00
|
|
|
equals( target.width(), 118, "compare width");
|
2008-06-04 08:47:26 +00:00
|
|
|
equals( target.height(), 120, "compare height");
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-06 20:37:32 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
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");
|
2008-05-31 16:56:09 +00:00
|
|
|
|
2008-06-02 03:06:09 +00:00
|
|
|
});
|