Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#5985 closed defect (fixed)

normalize, simplify animateProperty() API, perhaps alias to dojo.animate()

Reported by: alex Owned by: alex
Priority: high Milestone: 1.1
Component: fx Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by alex)

the following (currently working) animation call:

dojo.animateProperty({
  node: "thinger",
  properties: {
    left: { end: 100 }
  }
}).play()

Should be able to be shortened, without ambiguity, to:

dojo.animateProperty("thinger", { left: 100 }).play();

which implies that we should:

  • accept nodes as the first param and properties as the second
  • assume that if an object isn't passed for a particular property, we assume it to be the end
  • handle positioning (if something isn't relative, make it so, etc.)

Change History (4)

comment:1 Changed 12 years ago by alex

Description: modified (diff)

comment:2 Changed 12 years ago by alex

Status: newassigned

after further discussion with aubrey, we think this should be called "dojo.anim". Also, need to remember to update dojo.NodeList?-fx to add an anim() method to NodeLists?.

comment:3 Changed 12 years ago by alex

Resolution: fixed
Status: assignedclosed

(In [12797]) Updates to the animation system and a new convenience method. Fixes #5985. !strict

This checkin provides:

  • a simpler syntax for dojo.animateProperty() property specifications when only the end value is wanted
  • a new dojo.anim() method which simplifies animating a single node immensely
  • changes the default animation period to 350ms (down from 1000ms). A full second feels like forever in most transitions.
  • updating tests for animations and expanding to cover dojo.anim()
  • adding an anim() method on dojo.NodeList? objects via the dojo.NodeList?-fx extension
  • Adding tests for dojo.NodeList?-fx

All tested on IE 6, Firefox, and Safari

comment:4 Changed 12 years ago by alex

Milestone: 1.21.1
Note: See TracTickets for help on using tickets.