3 <title>Testing dojox.dtl using animation to change attributes</title>
4 <script src="../../../dojo/dojo.js" djConfig="parseOnLoad: true, usePlainJson: true"></script>
6 dojo.require("dijit._Widget");
7 dojo.require("dojox.dtl._HtmlTemplated");
9 dojo.declare("demo.Animation", [dijit._Widget, dojox.dtl._HtmlTemplated],
11 buffer: 0, // Note: Sensitivity is 0 by default, but this is to emphasize we're not doing any buffering
12 templatePath: dojo.moduleUrl("dojox.dtl.demos.templates", "animation.html"),
13 constructor: function(props, node){
14 console.debug("constructor");
18 postCreate: function(){
19 var anim = new dojo._Animation({
23 easing: dojo._defaultEasing
25 dojo.connect(anim, "onAnimate", this, "_reDraw");
28 _reDraw: function(obj){
30 this.y = Math.sqrt(obj) * 10;
32 dojo.style(this.blue, "left", this.x);
33 dojo.style(this.blue, "top", this.y + 10);
39 dojo.require("dojo.parser");
43 <div dojoType="demo.Animation" />