Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#9548 closed bug (fixed)

animate does not work with fill-opacity css property for svg elements

Reported by: jquery@… Owned by: Rick Waldron
Priority: low Milestone: 1.7
Component: effects Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

Code such as the following:

$(vertex).animate({ "fill-opacity": 1.0 }, "slow", "swing", function () { animateVertexQueue(vertexLabels); });

Does not cause the fill-opacity css property be changed as you would expect. Looking through the code the error is an omission from the cssNumber property, it reads:

	cssNumber: {
		"zIndex": true,
		"fontWeight": true,
		"opacity": true,
		"zoom": true,
		"lineHeight": true,
		"widows": true,
		"orphans": true
	},

But should read:

	cssNumber: {
		"zIndex": true,
		"fontWeight": true,
		"opacity": true,
		"fillOpacity": true,
		"zoom": true,
		"lineHeight": true,
		"widows": true,
		"orphans": true
	},

That is with fillOpacity added as a flag. This stops "px" from being appended to the property value in the easing, which cause the property change to fail.

Change History (6)

comment:1 Changed 12 years ago by anonymous

Sorry I should have added the cssNumber property is on line 6259 of jquery-1.6.1.js

comment:2 Changed 12 years ago by dmethvin

Component: unfiledeffects
Milestone: 1.next1.7
Priority: undecidedlow
Status: newopen

comment:3 Changed 12 years ago by Rick Waldron

Owner: set to Rick Waldron
Status: openassigned

Dammit dmethvin, you blitzed me!

comment:5 Changed 12 years ago by dmethvin

World's fastest bugfix, right here. :)

comment:6 Changed 12 years ago by rwldrn

Resolution: fixed
Status: assignedclosed

Landing pull request 409. Adds fillOpacity to internal cssNumber. Fixes #9548.

More Details:

Note: See TracTickets for help on using tickets.