Opened 12 years ago

Closed 11 years ago

Last modified 9 years ago

#4604 closed defect (fixed)

Error handling for gradient radial fill (missing 0 offset) in GFX

Reported by: guest Owned by: Eugene Lazutkin
Priority: low Milestone: 1.1
Component: DojoX GFX Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

If the following fill object is used for a rectangle fill:

var lg2 = {
		type: "radial",
		cx: 0, cy: 0, r: 50,
		colors: [
			{ offset: 0.2, color: "red" },
			{ offset: 0.8, color: "blue" }
			]
	};

IE 6 (SP2) stops at vml.js (line 93)

p.color = dojo.blendColors(q.color, p.color, q.offset / (q.offset - p.offset));

with an error: "'color' is null or not an object'. Index i is -1 at the time of the error.

Adding 0-offset to the gradient object fixes the problem:

var lg2 = {
		type: "radial",
		cx: 0, cy: 0, r: 50,
		colors: [
			{ offset: 0,   color: "red" },
			{ offset: 0.2, color: "red" },
			{ offset: 0.8, color: "blue" }
			]
	};

Change History (3)

comment:1 Changed 12 years ago by Eugene Lazutkin

Milestone: 1.1

comment:2 Changed 12 years ago by Eugene Lazutkin

Status: newassigned

comment:3 Changed 11 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [12673]) Fixing radial gradient problem when starting from offset > 0. Thx, Igor! Fixes #4604 !strict

Note: See TracTickets for help on using tickets.