Ticket #5985 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

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

Reported by: alex Owned by: alex
Priority: normal Milestone: 1.1
Component: fx Version: 1.0
Severity: normal Keywords:
Cc:

Description (last modified by alex) (diff)

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

Changed 4 months ago by alex

  • description modified (diff)

Changed 4 months ago by alex

  • status changed from new to assigned

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?.

Changed 4 months ago by alex

  • status changed from assigned to closed
  • resolution set to fixed

(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

Changed 4 months ago by alex

  • milestone changed from 1.2 to 1.1
Note: See TracTickets for help on using tickets.