#1160 closed defect (fixed)
missing fade() function from fx -> lfx transition
Reported by: | peter e higgins | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | lfx | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
the fx.* packages included in 0.3.1 come with a DEBUG warning not to use them, and rather use lfx.* instead. the fade() function found in src/fx/html.js did not make the transition into the src/lfx/html.js file ... the code was rewritten, but no function exists to fade an element FROM one opacity TO another value. (fadeIn -> 0..100, fadeOut 100..0) ...
this function provides a fade x..y using the same convention (read: heavily copy/pasted) as the surrounding functions in /src/lfx/html.js
-[snip]-
dojo.lfx.html.fade = function(nodes, duration, startOpac, endOpac, easing, callback){
nodes = dojo.lfx.html._byId(nodes); dojo.lfx.html._makeFadeable(nodes); var anim = dojo.lfx.propertyAnimation(nodes, [
{ property: "opacity",
start: startOpac, end: endOpac } ], duration, easing);
if(callback){
var oldOnEnd = (animonEnd?) ? dojo.lang.hitch(anim, "onEnd") : function(
{};
anim.onEnd = function(){ oldOnEnd(); callback(nodes, anim); };
}
return anim;
}
Fixed in #5018 I didn't use the same syntax, but something similar.