Changeset 1336

Show
Ignore:
Timestamp:
03/23/08 05:37:47 (4 months ago)
Author:
cederberg@gmail.com
Message:

Updated API docs for MochiKit.Visual.shrink(), pulsate() and fold(). Also clarified the puff() effects sequence.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mochikit/trunk/doc/html/MochiKit/Visual.html

    r1331 r1336  
    327327<a class="mochidef reference" href="#fn-puff">puff(element [, options])</a>:</p> 
    328328<blockquote> 
    329 <p>Make an <tt class="docutils literal"><span class="pre">element</span></tt> double size, and then make it disappear using the 
    330 <a class="mochiref reference" href="#fn-scale">Scale</a> and <a class="mochiref reference" href="#fn-opacity">Opacity</a> effects. Once the effect 
    331 has completed, the <tt class="docutils literal"><span class="pre">element</span></tt> will be hidden with 
     329<p>Make an <tt class="docutils literal"><span class="pre">element</span></tt> double size while also fading it using the 
     330<a class="mochiref reference" href="#fn-scale">Scale</a> and <a class="mochiref reference" href="#fn-opacity">Opacity</a> effects in parallel. 
     331Once the effect has completed, the <tt class="docutils literal"><span class="pre">element</span></tt> will be hidden with 
    332332<a class="mochiref reference" href="Style.html#fn-hideelement">MochiKit.Style.hideElement</a> and the original element 
    333333size, position and opacity will be restored.</p> 
     
    500500<a class="mochidef reference" href="#fn-shrink">shrink(element [, options])</a>:</p> 
    501501<blockquote> 
    502 <p>Shrink an element to its center.</p> 
    503 <dl class="docutils"> 
    504 <dt>element:</dt> 
    505 <dd>An element ID string or a DOM node (see 
    506 <a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     502<p>Shrinks an <tt class="docutils literal"><span class="pre">element</span></tt> to its center using <a class="mochiref reference" href="#fn-scale">Scale</a>, 
     503<a class="mochiref reference" href="#fn-move">Move</a> and <a class="mochiref reference" href="#fn-opacity">Opacity</a> effects in parallel. 
     504The <tt class="docutils literal"><span class="pre">element</span></tt> should have fixed width, height and top-left 
     505position. Once the effect has completed, the <tt class="docutils literal"><span class="pre">element</span></tt> will 
     506be hidden with <a class="mochiref reference" href="Style.html#fn-hideelement">MochiKit.Style.hideElement</a> and the 
     507original size and position will be restored.</p> 
     508<dl class="docutils"> 
     509<dt>element:</dt> 
     510<dd>An element ID string or a DOM node (see 
     511<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     512<dt>options:</dt> 
     513<dd><p class="first">The following options and default values controls this 
     514effect. Note that the <a class="mochiref reference" href="#fn-opacity">Opacity</a> effect is turned 
     515off by default. See also the <a class="mochiref reference" href="#fn-defaultoptions">DefaultOptions</a>:</p> 
     516<table border="1" class="last docutils"> 
     517<colgroup> 
     518<col width="34%" /> 
     519<col width="66%" /> 
     520</colgroup> 
     521<tbody valign="top"> 
     522<tr><td><tt class="docutils literal"><span class="pre">direction</span></tt></td> 
     523<td><tt class="docutils literal"><span class="pre">center</span></tt></td> 
     524</tr> 
     525<tr><td><tt class="docutils literal"><span class="pre">moveTransition</span></tt></td> 
     526<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
     527</tr> 
     528<tr><td><tt class="docutils literal"><span class="pre">scaleTransition</span></tt></td> 
     529<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
     530</tr> 
     531<tr><td><tt class="docutils literal"><span class="pre">opacityTransition</span></tt></td> 
     532<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.none</span></tt></td> 
     533</tr> 
     534</tbody> 
     535</table> 
     536</dd> 
     537</dl> 
     538<p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the destination point of the 
     539shrink effect. The following values are allowed:</p> 
     540<blockquote> 
     541<table border="1" class="docutils"> 
     542<colgroup> 
     543<col width="34%" /> 
     544<col width="66%" /> 
     545</colgroup> 
     546<tbody valign="top"> 
     547<tr><td><tt class="docutils literal"><span class="pre">center</span></tt></td> 
     548<td>Shrinks to the center</td> 
     549</tr> 
     550<tr><td><tt class="docutils literal"><span class="pre">top-left</span></tt></td> 
     551<td>Shrinks to the top left corner</td> 
     552</tr> 
     553<tr><td><tt class="docutils literal"><span class="pre">top-right</span></tt></td> 
     554<td>Shrinks to the top right corner</td> 
     555</tr> 
     556<tr><td><tt class="docutils literal"><span class="pre">bottom-left</span></tt></td> 
     557<td>Shrinks to the bottom left corner</td> 
     558</tr> 
     559<tr><td><tt class="docutils literal"><span class="pre">bottom-right</span></tt></td> 
     560<td>Shrinks to the bottom right corner</td> 
     561</tr> 
     562</tbody> 
     563</table> 
     564</blockquote> 
     565<dl class="docutils"> 
    507566<dt><em>Availability</em>:</dt> 
    508567<dd>Available in MochiKit 1.4+</dd> 
     
    513572<a class="mochidef reference" href="#fn-pulsate">pulsate(element [, options])</a>:</p> 
    514573<blockquote> 
    515 <p>Switch an element between appear and fade.</p> 
    516 <dl class="docutils"> 
    517 <dt>element:</dt> 
    518 <dd>An element ID string or a DOM node (see 
    519 <a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    520 <dt>options:</dt> 
    521 <dd><table border="1" class="first last docutils"> 
     574<p>Switches the <tt class="docutils literal"><span class="pre">element</span></tt> visibility using a pulsating 
     575<a class="mochiref reference" href="#fn-opacity">Opacity</a> effect. The effect both starts and 
     576ends with a <tt class="docutils literal"><span class="pre">0</span></tt> opacity value.</p> 
     577<dl class="docutils"> 
     578<dt>element:</dt> 
     579<dd>An element ID string or a DOM node (see 
     580<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     581<dt>options:</dt> 
     582<dd><p class="first">The <tt class="docutils literal"><span class="pre">pulses</span></tt> option controls the number of pulses 
     583made during the effect. See also the 
     584<a class="mochiref reference" href="#fn-defaultoptions">DefaultOptions</a>.</p> 
     585<table border="1" class="last docutils"> 
    522586<colgroup> 
    523587<col width="43%" /> 
     
    526590<tbody valign="top"> 
    527591<tr><td>pulses</td> 
    528 <td><tt class="docutils literal"><span class="pre">null</span></tt></td> 
     592<td><tt class="docutils literal"><span class="pre">5</span></tt></td> 
    529593</tr> 
    530594</tbody> 
    531595</table> 
    532596</dd> 
    533 </dl> 
    534 <p>pulses controls the number of pulses made during the effect.</p> 
    535 <dl class="docutils"> 
    536597<dt><em>Availability</em>:</dt> 
    537598<dd>Available in MochiKit 1.4+</dd> 
     
    542603<a class="mochidef reference" href="#fn-fold">fold(element [, options])</a>:</p> 
    543604<blockquote> 
    544 <p>Reduce first the vertical size, and then the horizontal size.</p> 
    545 <dl class="docutils"> 
    546 <dt>element:</dt> 
    547 <dd>An element ID string or a DOM node (see 
    548 <a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     605<p>Reduce first the <tt class="docutils literal"><span class="pre">element</span></tt> vertical size, and then the 
     606horizontal size using two <a class="mochiref reference" href="#fn-scale">Scale</a> effects in sequence. 
     607The <tt class="docutils literal"><span class="pre">element</span></tt> should have both fixed width and height. Once 
     608the effect has completed, the <tt class="docutils literal"><span class="pre">element</span></tt> will be hidden 
     609with <a class="mochiref reference" href="Style.html#fn-hideelement">MochiKit.Style.hideElement</a> and the original 
     610size and position will be restored.</p> 
     611<dl class="docutils"> 
     612<dt>element:</dt> 
     613<dd>An element ID string or a DOM node (see 
     614<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     615<dt>options:</dt> 
     616<dd>See <a class="mochiref reference" href="#fn-defaultoptions">DefaultOptions</a>. Note that the options 
     617will only affect the first <a class="mochiref reference" href="#fn-scale">Scale</a> effect.</dd> 
    549618<dt><em>Availability</em>:</dt> 
    550619<dd>Available in MochiKit 1.4+</dd> 
  • mochikit/trunk/doc/rst/MochiKit/Visual.rst

    r1331 r1336  
    260260:mochidef:`puff(element [, options])`: 
    261261 
    262     Make an ``element`` double size, and then make it disappear using the 
    263     :mochiref:`Scale` and :mochiref:`Opacity` effects. Once the effect 
    264     has completed, the ``element`` will be hidden with 
     262    Make an ``element`` double size while also fading it using the 
     263    :mochiref:`Scale` and :mochiref:`Opacity` effects in parallel. 
     264    Once the effect has completed, the ``element`` will be hidden with 
    265265    :mochiref:`MochiKit.Style.hideElement` and the original element 
    266266    size, position and opacity will be restored. 
     
    420420:mochidef:`shrink(element [, options])`: 
    421421 
    422     Shrink an element to its center. 
    423  
    424     element: 
    425         An element ID string or a DOM node (see 
    426         :mochiref:`MochiKit.DOM.getElement`). 
     422    Shrinks an ``element`` to its center using :mochiref:`Scale`, 
     423    :mochiref:`Move` and :mochiref:`Opacity` effects in parallel. 
     424    The ``element`` should have fixed width, height and top-left 
     425    position. Once the effect has completed, the ``element`` will 
     426    be hidden with :mochiref:`MochiKit.Style.hideElement` and the 
     427    original size and position will be restored. 
     428 
     429    element: 
     430        An element ID string or a DOM node (see 
     431        :mochiref:`MochiKit.DOM.getElement`). 
     432 
     433    options: 
     434        The following options and default values controls this 
     435        effect. Note that the :mochiref:`Opacity` effect is turned 
     436        off by default. See also the :mochiref:`DefaultOptions`. 
     437 
     438        ===================== ======================================== 
     439        ``direction``         ``center`` 
     440        ``moveTransition``    ``MochiKit.Visual.Transitions.sinoidal``     
     441        ``scaleTransition``   ``MochiKit.Visual.Transitions.sinoidal``     
     442        ``opacityTransition`` ``MochiKit.Visual.Transitions.none``     
     443        ===================== ======================================== 
     444 
     445    The ``direction`` option controls the destination point of the 
     446    shrink effect. The following values are allowed: 
     447 
     448        ===================== ======================================== 
     449        ``center``            Shrinks to the center 
     450        ``top-left``          Shrinks to the top left corner 
     451        ``top-right``         Shrinks to the top right corner 
     452        ``bottom-left``       Shrinks to the bottom left corner 
     453        ``bottom-right``      Shrinks to the bottom right corner 
     454        ===================== ======================================== 
    427455 
    428456    *Availability*: 
     
    432460:mochidef:`pulsate(element [, options])`: 
    433461 
    434     Switch an element between appear and fade. 
    435  
    436     element: 
    437         An element ID string or a DOM node (see 
    438         :mochiref:`MochiKit.DOM.getElement`). 
    439  
    440     options: 
     462    Switches the ``element`` visibility using a pulsating 
     463    :mochiref:`Opacity` effect. The effect both starts and 
     464    ends with a ``0`` opacity value. 
     465 
     466    element: 
     467        An element ID string or a DOM node (see 
     468        :mochiref:`MochiKit.DOM.getElement`). 
     469 
     470    options: 
     471        The ``pulses`` option controls the number of pulses 
     472        made during the effect. See also the 
     473        :mochiref:`DefaultOptions`. 
     474 
    441475        ====== ======== 
    442         pulses ``null`` 
     476        pulses ``5`` 
    443477        ====== ======== 
    444478 
    445     pulses controls the number of pulses made during the effect. 
    446  
    447479    *Availability*: 
    448480        Available in MochiKit 1.4+ 
     
    451483:mochidef:`fold(element [, options])`: 
    452484 
    453     Reduce first the vertical size, and then the horizontal size. 
    454  
    455     element: 
    456         An element ID string or a DOM node (see 
    457         :mochiref:`MochiKit.DOM.getElement`). 
     485    Reduce first the ``element`` vertical size, and then the 
     486    horizontal size using two :mochiref:`Scale` effects in sequence. 
     487    The ``element`` should have both fixed width and height. Once 
     488    the effect has completed, the ``element`` will be hidden 
     489    with :mochiref:`MochiKit.Style.hideElement` and the original 
     490    size and position will be restored. 
     491 
     492    element: 
     493        An element ID string or a DOM node (see 
     494        :mochiref:`MochiKit.DOM.getElement`). 
     495 
     496    options: 
     497        See :mochiref:`DefaultOptions`. Note that the options 
     498        will only affect the first :mochiref:`Scale` effect. 
    458499 
    459500    *Availability*: