|
Hi
I'm pretty sure I have used some kind of relative units when I was working with dojo animation methods in the past, something like '+=100px'. After a while not working with dojo, I wanted to use it again but I couldn't. maybe I've forgotten something ;) Then I started browsing docs and manuals to take a look at syntax and all I found was nothing (just typical examples) Can anyone please give me a hint about where to look or what phrase to search for this kind of units |
|
It's just an option to the animateProperty object.
Covered in the docs: http://docs.dojocampus.org/dojo/animateProperty Second example, fontChoice specifing utils of pt. For say percentage units, you use "%" Or are you looking for something else? -- Jared On Fri, Jun 4, 2010 at 7:49 PM, neopersia <[hidden email]> wrote: > > Hi > > I'm pretty sure I have used some kind of relative units when I was working > with dojo animation methods in the past, something like '+=100px'. > > After a while not working with dojo, I wanted to use it again but I > couldn't. maybe I've forgotten something ;) > Then I started browsing docs and manuals to take a look at syntax and all I > found was nothing (just typical examples) > > Can anyone please give me a hint about where to look or what phrase to > search for this kind of units > > > -- > View this message in context: http://dojo-toolkit.33424.n3.nabble.com/animation-relative-units-tp871822p871822.html > Sent from the Dojo Toolkit mailing list archive at Nabble.com. > _______________________________________________ > FAQ: http://dojotoolkit.org/support/faq > Book: http://docs.dojocampus.org > [hidden email] > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest > FAQ: http://dojotoolkit.org/support/faq Book: http://docs.dojocampus.org [hidden email] http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
Thanks for replying but I don't thinks that's what I'm looking for
I didn't mean by percent, what I remember is like what I said for example to move some DOM element 100 pixels to left, instead of calculating its current left coordinates and adding 100 pixels to it in animation, I could simply write something like '+=100px' in animation properties I really think it was dojo because I haven't work with any other library for a long time :D |
|
neopersia wrote:
> Thanks for replying but I don't thinks that's what I'm looking for > > I didn't mean by percent, what I remember is like what I said > for example to move some DOM element 100 pixels to left, instead of > calculating its current left coordinates and adding 100 pixels to it in > animation, I could simply write something like '+=100px' in animation > properties > > I really think it was dojo because I haven't work with any other library for > a long time :D > dojo.animateProperty({ node:"id", properties:{ top: function(n){ // increment the node's top value by 100 return dojo.position(n).y + 100; } } }).play(); I added the top: function(){} or top:{ start:function(){}, end:function(){} } calculation in 1.4 ~phiggins _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://docs.dojocampus.org [hidden email] http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
Ok, thanks peter
sounds like I was wrong :) Now this +=100px will be bugging me until I figure out where I saw it! this is how I handled it: dojo.animateProperty({ node: gallery.node, properties: { left: function() { return gallery.node.offsetLeft + step; } }, beforeBegin: function() {gallery.locked=true;}, onEnd: function() {gallery.locked=false;} }).play(); I notices you passed n to the function, is that animation node being passed to properties? |
| Powered by Nabble | Edit this page |
