Opened 4 years ago

Closed 4 years ago

#18566 closed defect (patchwelcome)

dojox/fx/ext-dojo/complex no longer works for rgba

Reported by: rjh Owned by: Bryan Forbes
Priority: undecided Milestone: 1.13
Component: fx Version: 1.9.7
Keywords: Cc:
Blocked By: Blocking:


I believe originally the complex extension for dojo fx was modified here to support changing rgba backgrounds. Since then I feel as if the format of the property object has changed quite a bit. Below is the relevant code from the complex extension:

if(start instanceof dojo.Color){
  ret[p] = dojo.blendColors(start, prop.end, r, prop.tempColor).toCss();
}else if(start instanceof dojox.fx._Complex){
  ret[p] = start.getValue(r);
}else if(!dojo.isArray(start)){
  ret[p] = ((prop.end - start) * r) + start + (p != "opacity" ? prop.units || "px" : 0);

the start attribute in properties is no longer an instance of dojo.Color but rather of dojox.fx._Complex, while the end attribute remains an instance of dojo.Color. Also the original patch that returns a css with alpha ".toCss(true)" has now been reverted back to ".toCss()" which ignores alpha.

Change History (4)

comment:1 Changed 4 years ago by bill

#18567 is a duplicate of this ticket.

comment:2 Changed 4 years ago by bill

You linked to #10766 but that ticket was closed as invalid. Is there a commit you can link to (in that changed the behavior?

comment:3 Changed 4 years ago by rjh

Oh sorry about that I didn't read the ticket very thoroughly at first. I have no idea where the commit that would have caused this change in behavior happened but there is an original ticket here that doesn't link to when it was fixed (although it does mention that the dojox complex extension is supposed to fix it) but just that the original problem was supposed to be fixed on 1.5.

Either way though, it's pretty easy to replicate. As the ticket mentioned above states:

  duration: 5000, /* to ensure it wasnt be missed in a quick transition */
  properties: {
      backgroundColor: { end: "rgba(128,128,128,.75)", start:"rgba(128,128,128,.33)" },

Will show you that transitioning rgba colors does not work because it ignores the alpha. If you try to require the complex extension, then the background won't even change colors at all which led me to look into the problem mentioned in the original submission. My guess would be that the complex extension is pretty outdated?

comment:4 Changed 4 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in more than a year, I'm closing this as patchwelcome. Please let us know if you would like to get involved in helping make this change to Dojo!

Note: See TracTickets for help on using tickets.