Opened 13 years ago

Closed 13 years ago

#3123 closed defect (fixed)

dojo.Color methods not IE compatible

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone: 0.9beta
Component: gfx (svg+vml) Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

dojo.hex2rgb() has this line

(hex[0] == "#")

string can not be indexed in IE

It should be

hex.charAt(0) == "#"

There are similar problems in blendColors() The code should use charAt for string and use [] for array.

Change History (6)

comment:1 Changed 13 years ago by guest

Oh wow, hex2rgb() is fixed by [8176]

There's still problems in blendColors() though.

comment:2 Changed 13 years ago by guest

Found another problem

When you setStroke({color: colorObject}) with a dojo.Color object,

it calls dojox.gfx.makeParameters() which calls dojox.gfx.util._copy on that dojo.Color object.

_copy does not copy methods correctly. (So subsequent call to toCss() is wrong, leading to wrong color)

comment:3 Changed 13 years ago by Eugene Lazutkin

OK, I'll look into that.

comment:4 Changed 13 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

(In [8720]) Making sure that dojo.blendColor() works under IE, with wider range of arguments; added all 16 HTML4 colors from the CSS3 color module --- we need to support at least those. Fixes #3123.

comment:5 Changed 13 years ago by Eugene Lazutkin

Resolution: fixed
Status: closedreopened

Forgot that there is another problem mentioned in comments. Please open new ticket next time.

comment:6 Changed 13 years ago by Eugene Lazutkin

Resolution: fixed
Status: reopenedclosed

(In [8722]) Skipping inherited and/or default values while cloning an object. Fixes #3123.

Note: See TracTickets for help on using tickets.