aboutsummaryrefslogtreecommitdiffstats
path: root/ui/tests/resizable.js
diff options
context:
space:
mode:
authorEduardo Lundgren <eduardolundgren@gmail.com>2008-05-30 04:35:54 +0000
committerEduardo Lundgren <eduardolundgren@gmail.com>2008-05-30 04:35:54 +0000
commit3c2a4f57affea3da49e0e3ca1a3c73e31180ede0 (patch)
treebf2ec46e06b6707d6e767b4640d8acced90dbf1e /ui/tests/resizable.js
parentc8297ce04b26e307a7130bbd60215ac54238afa4 (diff)
downloadjquery-ui-3c2a4f57affea3da49e0e3ca1a3c73e31180ede0.tar.gz
jquery-ui-3c2a4f57affea3da49e0e3ca1a3c73e31180ede0.zip
Start simulating tests with userAction combined with Richard's animated cursor
Diffstat (limited to 'ui/tests/resizable.js')
-rw-r--r--ui/tests/resizable.js65
1 files changed, 42 insertions, 23 deletions
diff --git a/ui/tests/resizable.js b/ui/tests/resizable.js
index 0ed3e1e9b..d561f32a6 100644
--- a/ui/tests/resizable.js
+++ b/ui/tests/resizable.js
@@ -1,45 +1,64 @@
var console = console || {
log: function(l) {
- $('#log').append(l + '<br/>');
+ $('#log').append(l + '<br/>').get(0).scrollTop = 10000;
}
};
+var animateClick = function(co) {
+ var img = $("<img src='images/click.png' width='1'>").appendTo("body")
+ .css({ position: "absolute", zIndex: 1000, left: co.x, top: co.y })
+ .animate({ width: 80, height: 80, left: co.x-40, top: co.y-40, opacity: 'hide' }, 1000, function() { $(this).remove(); });
+ };
+
var num = function(i) {
return parseInt(i, 10);
};
-
$(document).ready(function() {
- $("#resizable1").resizable({
-
- //maxHeight: 200,
-
- start: function(e, ui) {
- //console.log('start: [' + e.pageX + ', ' + e.pageY + ']' )
- //console.log(ui.instance.size, ui.instance.position)
- },
-
- stop: function(e, ui) {
- //console.log('stop: [' + e.pageX + ', ' + e.pageY + ']' )
- //console.log(ui.instance.size, ui.instance.position)
- },
-
- resize: function(e) {
- //console.log(e);
+
+ $('#resizable1').resizable({
+ resize: function() {
+ //console.log('resize')
}
});
+ $('.ui-resizable-se').userAction("drag", 100);
+ $('.ui-resizable-se').userAction("drag", 200, 50);
+ $('.ui-resizable-se').userAction("drag", 400);
+ $('.ui-resizable-se').userAction("drag", -600, -30);
- return;
-
+ return;
+
module("resizable: simple resize");
- test("simple drag", function() {
+ test("simple resize x", function() {
- expect(1);
- ok(true, "Resize element on the same position");
+ $('#resizable1').resizable({
+ resize: function() {
+ console.log('resize')
+ }
+ });
+
+ $('.ui-resizable-e').userAction("drag", 100);
+ $('.ui-resizable-e').userAction("drag", 200);
+ $('.ui-resizable-e').userAction("drag", 200);
+
+ //expect(2);
+ //ok(false, "Resize element on the same position");
+
});
+
+ /*test("autoheight", function() {
+ $('#navigation').accordion({ header: '.head', autoheight: false });
+ equals( 90, $('#navigation ul:first').height() );
+ equals( 126, $('#navigation ul:eq(1)').height() );
+ equals( 54, $('#navigation ul:last').height() );
+ $('#navigation').accordion("destroy").accordion({ header: '.head',autoheight: true });
+ equals( 126, $('#navigation ul:first').height() );
+ equals( 126, $('#navigation ul:eq(1)').height() );
+ equals( 126, $('#navigation ul:last').height() );
+ });*/
}); \ No newline at end of file