Bug Tracker

Ticket #9548 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

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

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

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

comment:1 Changed 4 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 4 years ago by dmethvin

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to effects
  • Milestone changed from 1.next to 1.7

comment:3 Changed 4 years ago by rwaldron

  • Owner set to rwaldron
  • Status changed from open to assigned

Dammit dmethvin, you blitzed me!

comment:5 Changed 4 years ago by dmethvin

World's fastest bugfix, right here. :)

comment:6 Changed 4 years ago by rwldrn

  • Status changed from assigned to closed
  • Resolution set to fixed

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

More Details:

Note: See TracTickets for help on using tickets.