Opened 13 years ago

Closed 13 years ago

#9068 closed enhancement (fixed)

Animation properites could be a function

Reported by: dante Owned by: dante
Priority: high Milestone: 1.4
Component: fx Version: 1.3.0
Keywords: Cc: Adam Peller, bill, James Burke, Eugene Lazutkin, Bryan Forbes
Blocked By: Blocking:


We allow the properties object passed to various animateProperty fx to be functions, but only for start and end values. It would be nice you were able to pass a function as the property itself, eg:

dojo.anim(node, { width:function(){ return, "width")/2; } });

This came up as I was looking into a solution to a sizeTo/caching issue I have, where the original passed values, desipte being calculated, are not being update in the animateProperty call if someone calls the animation after restyling or positioning. This would help fix this, and is a trivial addition.

patch attached, seeking comment. Have local tests, and will convert to unit tests if this small change is ok.

Attachments (1)

fx.patch (20.8 KB) - added by dante 13 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 13 years ago by dante

Cc: Adam Peller bill James Burke Eugene Lazutkin added
Status: newassigned

most recent patch is in place, would love a review / RFC

comment:2 Changed 13 years ago by Adam Peller

Cc: Bryan Forbes added

Changed 13 years ago by dante

Attachment: fx.patch added

comment:3 Changed 13 years ago by dante

Resolution: fixed
Status: assignedclosed

see [17247]

Note: See TracTickets for help on using tickets.