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

Author:
David Nickerson <nickerso@users.sourceforge.net>
Date:
2009-07-16 02:00:03+12:00
Desc:
the starting point for the HH tutorial example
Permanent Source URI:
https://models.fieldml.org/workspace/a1/rawfile/f6a8f90307388eb4b040ee3566b84d88b59247f7/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().