mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Starting alpha tests using userAction syncrhonous drag
This commit is contained in:
parent
e175417d95
commit
956656bc2a
@ -32,7 +32,7 @@
|
|||||||
<h2 id="log" style="height: 50px;overflow-y:auto;"></h2>
|
<h2 id="log" style="height: 50px;overflow-y:auto;"></h2>
|
||||||
|
|
||||||
<div id="main" style="border: 1px solid black; padding: 10px; margin: 10px;">
|
<div id="main" style="border: 1px solid black; padding: 10px; margin: 10px;">
|
||||||
<div id='resizable1' style="background: green; width: 200px; height: 100px;">I'm a resizable.</div>
|
<div id='resizable1' style="background: green; width: 100px; height: 100px;">I'm a resizable.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ol id="tests"></ol>
|
<ol id="tests"></ol>
|
||||||
|
@ -16,23 +16,15 @@ var num = function(i) {
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
var drag = function(el, dx, dy, complete) {
|
||||||
|
|
||||||
$('#resizable1').resizable({
|
// speed = sync -> Drag syncrhonously.
|
||||||
resize: function() {
|
// speed = fast|slow -> Drag asyncrhonously - animated.
|
||||||
//console.log('resize')
|
|
||||||
}
|
$(el).userAction("drag", {
|
||||||
|
dx: dx, dy: dy, speed: 'sync', complete: complete
|
||||||
});
|
});
|
||||||
|
};
|
||||||
$('.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;
|
|
||||||
|
|
||||||
module("resizable: simple resize");
|
|
||||||
|
|
||||||
test("simple resize x", function() {
|
|
||||||
|
|
||||||
$('#resizable1').resizable({
|
$('#resizable1').resizable({
|
||||||
resize: function() {
|
resize: function() {
|
||||||
@ -40,25 +32,27 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.ui-resizable-e').userAction("drag", 100);
|
module("Test 1");
|
||||||
$('.ui-resizable-e').userAction("drag", 200);
|
|
||||||
$('.ui-resizable-e').userAction("drag", 200);
|
|
||||||
|
|
||||||
//expect(2);
|
test("simple resize tests", function() {
|
||||||
//ok(false, "Resize element on the same position");
|
|
||||||
|
|
||||||
|
drag('.ui-resizable-se', 100, 50);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*test("autoheight", function() {
|
|
||||||
$('#navigation').accordion({ header: '.head', autoheight: false });
|
test("simple resize tests 2", function() {
|
||||||
equals( 90, $('#navigation ul:first').height() );
|
|
||||||
equals( 126, $('#navigation ul:eq(1)').height() );
|
//drag('.ui-resizable-se', 0, 1000);
|
||||||
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() );
|
module("Test 2");
|
||||||
equals( 126, $('#navigation ul:last').height() );
|
|
||||||
});*/
|
test("simple resize tests", function() {
|
||||||
|
|
||||||
|
//drag('.ui-resizable-se', 15, 0);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user