Skip to main content

Bug Tracker

Side navigation

#9548 closed bug (fixed)

Opened June 08, 2011 05:40PM UTC

Closed June 14, 2011 08:01PM UTC

Last modified March 09, 2012 05:54AM UTC

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

Reported by: Owned by: rwaldron
Priority: low Milestone: 1.7
Component: effects Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

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.

Attachments (0)
Change History (6)

Changed June 08, 2011 05:41PM UTC by anonymous comment:1

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

Changed June 08, 2011 05:43PM UTC by dmethvin comment:2

component: unfiledeffects
milestone: 1.next1.7
priority: undecidedlow
status: newopen

Changed June 08, 2011 05:45PM UTC by rwaldron comment:3

owner: → rwaldron
status: openassigned

Dammit dmethvin, you blitzed me!

Changed June 08, 2011 06:09PM UTC by rwaldron comment:4

Changed June 09, 2011 12:59AM UTC by dmethvin comment:5

World's fastest bugfix, right here. :)

Changed June 14, 2011 08:01PM UTC by rwldrn comment:6

resolution: → fixed
status: assignedclosed

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

More Details:

Changeset: 5eef5917fdb399ace2698154c4cd7bbd24f13182