Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13566 closed defect (fixed)

Fix dojo/_base/Color AMD to use minimal dependencies/return values

Reported by: Chris Mitchell Owned by: Chris Mitchell
Priority: high Milestone: 1.7
Component: Core Version: 1.6.1
Keywords: dohfail Cc:
Blocked By: Blocking:

Description

Fix dojo/_base/Color AMD to use minimal dependencies/return values

Change History (8)

comment:1 Changed 8 years ago by Chris Mitchell

Resolution: fixed
Status: newclosed

fixed in r26004

comment:2 Changed 8 years ago by Chris Mitchell

In [26007]:

refs #13566 bugfix in amd port of Color.toHex

comment:3 Changed 8 years ago by bill

Keywords: dohfail added
Priority: normalhigh
Resolution: fixed
Status: closedreopened

Starting with [26004] tests.colors (run through URL http://.../util/doh/runner.html?testModule=dojo.tests.colors) gets lots of failures on IE8.

comment:4 Changed 8 years ago by Douglas Hays

Should dojo/colors.js return baseColor after modifying the base return object instead of dojo.colors what seems useless.

comment:5 Changed 8 years ago by Douglas Hays

dojo/colors.js needs to add baseColor.fromRgb = dojo.colorFromRgb. I don't understand why the new API dojo.colors.fromRgb was recently added in [25980] just for Editor.

comment:6 Changed 8 years ago by bill

I made the change in [25980] because otherwise there was no way to access colorFromRgb() (a.k.a. fromRgb()) via AMD; you needed to go through the dojo global. The fact that Editor is the only dojo internal code using fromRgb() is neither here nor there.

I think the reason that dojo/colors.js is returning dojo.colors is because of the file name, and because it's creating a global called dojo.colors that contains dojo.colors.makeGray().

Probably eventually there should be a dojo/Color.js module that combines dojo/_base/Color.js and dojo/colors?

Anyway, I'm guess I'm OK with dojo/colors.js returning baseColor (a.k.a dojo.Color), although, to make its methods fromRgb() and makeGray() available via AMD, they would need to be added to to baseColor.

comment:7 Changed 8 years ago by Chris Mitchell

Resolution: fixed
Status: reopenedclosed

In [26234]:

fixes #13566 update dojo/colors to AMD

comment:8 Changed 8 years ago by Douglas Hays

In [26239]:

Refs #13566. Removed dojo.colors.fromRgb API since it was new to 1.7 and replaceable with (returnvalue).fromRgb since dojo.colors is not the returned value.
Added (returnvalue).makeGrey=dojo.colors.makeGrey for compatibility with 1.6.

Note: See TracTickets for help on using tickets.