summaryrefslogtreecommitdiff
path: root/includes/js/dojox/fx/tests/test_slideBy.html
blob: a1a1960ed8db74d211e58a8ed9a1023b82ffe083 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>dojox.fx - animation sets to use!</title>
		
	<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug:true, parseOnLoad: true" ></script>
	<script type="text/javascript" src="../_base.js"></script>
	<style type="text/css">
		@import "../../../dojo/resources/dojo.css";
		@import "../../../dijit/themes/dijit.css";
		@import "../../../dijit/themes/tundra/tundra.css";
		@import "../../../dijit/tests/css/dijitTests.css";

		
		#sizeToTest {
			position:absolute;
			top:0;
			left:300px; 
			border:2px solid #ededed; 
			width:50px; height:50px; 
			background:#fff; 
			text-align:center; 
		}	
		.test { width:100px; height:50px; border:3px solid #333; 
			position:absolute; 
		} 
		.box1 { top:20px; left:10px; }
		.box2 { top:85px; left:10px; }
		.box3 { top:170px; left:10px; } 
		.holder { position:relative; height:300px; } 

	</style>
	<script type="text/javascript">
		dojo.require("dojox.fx.ext-dojo.NodeList"); 

		function chainTest(){
			// FIXME: not recalculating mixin in init? or not re-mixing, rather. 
			// happens to a lot of propertyAnimations, actually when chaining, with a
			// fixed 'start' property in the mixin. see _base/fx.js:slideBy() 
			dojo.fx.chain([
				dojox.fx.slideBy({ node: 'sizeToTest', top:50, left:50, duration:400 }),
				dojox.fx.slideBy({ node: 'sizeToTest', top:25, left:-25, duration:400 })
			]).play();
		}
	</script>
</head>
<body class="tundra">
	<h1 class="testTitle">dojox.fx.slideBy test</h1>

	<a href="#" onclick="javascript:dojox.fx.slideBy({node:'sizeToTest', top:50,  left:50,  duration:200 }).play()">top: 50, left:50</a>
	<a href="#" onclick="javascript:dojox.fx.slideBy({node:'sizeToTest', top:-50, left:50,  duration:400 }).play()">top:-50, left:50</a>
	<a href="#" onclick="javascript:dojox.fx.slideBy({node:'sizeToTest', top:-50, left:-50, duration:400 }).play()">top:-50, left:-50</a>
	<a href="#" onclick="javascript:dojox.fx.slideBy({node:'sizeToTest', top:50,  left:-50, duration:400 }).play()">top:50, left:-50</a>
	<a href="#" onclick="javascript:dojo.query('.test').slideBy({ top:0, left:300 }).play()">dojo.query()</a>
	<a href="#" onclick="javascript:chainTest()">chainTest</a>

	<div id="sizeToTest">
	lorem. ipsum. 
	</div>

	<br style="clear:both;">

	<div class="holder">
		<div class="test box1">a</div><div class="test box2">b</div><div class="test box3">c</div>
	</div>


	HTML AFTER
	<br>



</body>
</html>