Re: What's a mixin for Animation?
Frank W. Zammetti <fzlists <at> omnytex.com>
2007-08-01 23:38:49 GMT
I can never read about Dojo and "mixins" without wanting to run out to
Coldstone Creamery for some ice cream.
Mmmmmm..... ice cream.... gahghaghaghaghahahahahg
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti <at> hotmail.com
Author of "Practical Ajax Projects With Java Technology"
(2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
(2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
peter e higgins wrote:
> This was a documentation bug that was fixed in SVN yesterday actually.
>
> dojo.fx.slideTo({ node: 'divId', duration: 1000, top: 1000, left:
> 400 }).play();
>
> gives you the animation you are looking for.
>
> the idea of 'mixin' is such that dojo.fx.slideTo 'mixes' your object
> {node:etc, etc} into a dojo.animateProperty _Animation, which uses a similar
> object:
>
> dojo.animateProperty({ node: 'nodeId', duration: 1000,
> properties: {
> top: { end: 1000, unit: "px" },
> left: { end: 400, unit:"px" }
> /* opacity: { }, backgroundColor: { }, etc, etc */
> }
> }).play();
>
> dojo.animateProperty is very useful.
>
> On Wednesday 01 August 2007 19:23, Siah Sookhteh wrote:
>> Hi,
>>
>> I am trying to get 0.9's dojo.fx.slideTo to work and in the dojo's
>> code there is this comment:
>>
>> // addition mixin args needed:
>> // coords: { top: Decimal?, left: Decimal? }
>>
>> But, I'm not sure where this has to go. I read
>> http://dojotoolkit.org/book/dojo-porting-guide-0-4-x-0-9/effects-dojo-lfx-c
>> hanges and its not too clear what a mixin is. So, I've unsuccessfully tried
>> all the following:
>>
>> dojo.fx.slideTo({node:'DIV_ID', duration: 1000, 'coords':{ top: 1000,
>> left: 400}}).play();
>>
>> and here it always animates my DIV to 0 and 0
>>
>> I also tried placing 'coords' key within another 'properties'
>> dictionary, and interestingly enough, it stops animation all together.
>>
>> Thanks,
>> Sia
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://dojotoolkit.org/docs/book
>> Forums: http://dojotoolkit.org/forum
>> Dojo-interest <at> dojotoolkit.org
>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest <at> dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>
>
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest <at> dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-interest