Location: A review of cardiac cellular electrophysiology models @ 98909b01e6b2 / dojo-presentation / js / dojo / dojox / fx / tests / test_animateClass.html

Author:
David Nickerson <nickerso@users.sourceforge.net>
Date:
2009-07-07 17:11:57+12:00
Desc:
update for modified HH graphs in tutorial description
Permanent Source URI:
https://models.physiomeproject.org/workspace/a1/rawfile/98909b01e6b21653a5e1cd28865dd259c586d490/dojo-presentation/js/dojo/dojox/fx/tests/test_animateClass.html

dojox.fx.style tests

dojox.fx.style provides a few methods to animate the changes that would occur when adding or removing a class from a domNode.

  • dojox.fx.addClass(/* Object */)args); // Returns dojo._Animation
  • dojox.fx.removeClass(/* Object */args); // Returns dojo._Animation
  • dojox.fx.toggleClass(/* DomNode */node, /* String */cssClass,/* Boolean */force)
spacing test line-height test font-size test

testing sizes

add .tall remove .tall add .wide remove .wide toggle .tiny

testing position

This is a div position:relative with a position:absolute div inside. testing various t/l/b/r combos. normal css inheritance rules apply, so setting .foo .bar if .foo was defined last in the css text, .bar will take precedent. the below position test shows the results of this:

.offsetSome .topLeft .bottomRight
toggle .green toggle .black toggle .blue

Some properties cannot be modified (fontFace, and so on), so to ensure the results at the end of the animation are applied correctly and fully, the class name is set on the node via dojo.add/removeClass().