dojo/fx/Toggler.js

  • Provides:

    • dojo.fx.Toggler
  • dojo.fx.Toggler

    • type
      Function
    • summary
      A simple `dojo.Animation` toggler API.
    • description
      class constructor for an animation toggler. It accepts a packed
      set of arguments about what type of animation to use in each
      direction, duration, etc. All available members are mixed into
      these animations from the constructor (for example, `node`,
      `showDuration`, `hideDuration`).
    • example
      
      	var t = new dojo.fx.Toggler({
      		node: "nodeId",
      		showDuration: 500,
      		// hideDuration will default to "200"
      		showFunc: dojo.fx.wipeIn,
      		// hideFunc will default to "fadeOut"
      	});
      	t.show(100); // delay showing for 100ms
      	// ...time passes...
      	t.hide();
    • parameters:
      • args: (typeof )
    • source: [view]
        var _t = this;


        dojo.mixin(_t, args);
        _t.node = args.node;
        _t._showArgs = dojo.mixin({}, args);
        _t._showArgs.node = _t.node;
        _t._showArgs.duration = _t.showDuration;
        _t.showAnim = _t.showFunc(_t._showArgs);


        _t._hideArgs = dojo.mixin({}, args);
        _t._hideArgs.node = _t.node;
        _t._hideArgs.duration = _t.hideDuration;
        _t.hideAnim = _t.hideFunc(_t._hideArgs);


        dojo.connect(_t.showAnim, "beforeBegin", dojo.hitch(_t.hideAnim, "stop", true));
        dojo.connect(_t.hideAnim, "beforeBegin", dojo.hitch(_t.showAnim, "stop", true));
  • dojo.fx.Toggler.node

    • type
      DomNode
    • summary
      the node to target for the showing and hiding animations
  • dojo.fx.Toggler.showFunc

    • type
      Function
    • summary
      The function that returns the `dojo.Animation` to show the node
  • dojo.fx.Toggler.hideFunc

    • type
      Function
    • summary
      The function that returns the `dojo.Animation` to hide the node
  • dojo.fx.Toggler.showDuration

    • type
      Time
    • summary
      in milliseconds to run the show Animation
  • dojo.fx.Toggler.hideDuration

    • type
      Time
    • summary
      in milliseconds to run the hide Animation
  • dojo.fx.Toggler._showArgs

    • summary
  • dojo.fx.Toggler._showAnim

    • summary
  • dojo.fx.Toggler._hideArgs

    • summary
  • dojo.fx.Toggler._hideAnim

    • summary
  • dojo.fx.Toggler._isShowing

    • summary
  • dojo.fx.Toggler._isHiding

    • summary
  • dojo.fx.Toggler.show

    • type
      Function
    • parameters:
      • delay: (typeof Integer)
        Ammount of time to stall playing the show animation
    • source: [view]
        return this.showAnim.play(delay || 0);
    • summary
      Toggle the node to showing
  • dojo.fx.Toggler.hide

    • type
      Function
    • parameters:
      • delay: (typeof Integer)
        Ammount of time to stall playing the hide animation
    • source: [view]
        return this.hideAnim.play(delay || 0);
    • summary
      Toggle the node to hidden
  • _t

    • mixins:
      • args: (normal)
    • summary
  • dojo.fx

    • type
      Object
    • summary
  • dojo

    • type
      Object
    • summary