Opened 13 years ago

Last modified 9 years ago

#5475 closed enhancement

Eliminate ways of circumventing the Color constructor — at Initial Version

Reported by: ptwobrussell Owned by: Eugene Lazutkin
Priority: low Milestone: 1.7
Component: Core Version: 1.0
Keywords: needsreview Cc: [email protected]
Blocked By: Blocking:

Description

From my read of Color.js, it seems like the API would benefit from eliminating the exposed dojo.colorFromRgb, dojo.colorFromHex, and dojo.colorFromArray functions and instead sticking them inside of the class itself. I'm sort of confused by the way that these methods allow you to circumvent the Color constructor itself, and I believe that the API would be a lot more crisp if you just used the Color constructor directly.

My recommendation is to tuck these methods inside of the Color class for Dojo 2.0.

If I've really missed something here (entirely possible) can you include a descriptive message which explains why these functions *should* be exposed, so that I can better present them in the book I'm writing -- because right now, I'm planning on skipping over them entirely for the reasons mentioned.

I don't know who else to assign to, so i looked at the revision log and noticed that elazutkin seems to be the maintainer, so I'll start there.

Change History (0)

Note: See TracTickets for help on using tickets.