Changeset 1330

Show
Ignore:
Timestamp:
03/16/08 11:09:35 (7 months ago)
Author:
cederberg@gmail.com
Message:

Updated API doc for MochiKit.Visual.fade, appear, puff and Parallel.

Files:

Legend:

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

    r1329 r1330  
    176176<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    177177<dt>effect:</dt> 
    178 <dd>One of the visual pairs to use. Choose between 'slide', 'blind', 
    179 'appear', and 'size'.</dd> 
     178<dd><p class="first">One of the visual pairs to use:</p> 
     179<table border="1" class="last docutils"> 
     180<colgroup> 
     181<col width="21%" /> 
     182<col width="79%" /> 
     183</colgroup> 
     184<tbody valign="top"> 
     185<tr><td><tt class="docutils literal"><span class="pre">&quot;appear&quot;</span></tt></td> 
     186<td><a class="mochiref reference" href="#fn-appear">appear</a> and <a class="mochiref reference" href="#fn-fade">fade</a></td> 
     187</tr> 
     188<tr><td><tt class="docutils literal"><span class="pre">&quot;blind&quot;</span></tt></td> 
     189<td><a class="mochiref reference" href="#fn-blindup">blindUp</a> and <a class="mochiref reference" href="#fn-blinddown">blindDown</a></td> 
     190</tr> 
     191<tr><td><tt class="docutils literal"><span class="pre">&quot;size&quot;</span></tt></td> 
     192<td><a class="mochiref reference" href="#fn-grow">grow</a> and <a class="mochiref reference" href="#fn-shrink">shrink</a></td> 
     193</tr> 
     194<tr><td><tt class="docutils literal"><span class="pre">&quot;slide&quot;</span></tt></td> 
     195<td><a class="mochiref reference" href="#fn-slideup">slideUp</a> and <a class="mochiref reference" href="#fn-slidedown">slideDown</a></td> 
     196</tr> 
     197</tbody> 
     198</table> 
     199</dd> 
    180200<dt>options:</dt> 
    181201<dd>The optional effect options (see effect functions for details).</dd> 
     
    242262<p> 
    243263<a name="fn-fade"></a> 
    244 <a class="mochidef reference" href="#fn-fade">fade(element [, options])</a>:</p> 
    245 <blockquote> 
    246 <p>Change the opacity of an element until making it disappear.</p> 
    247 <p>options:</p> 
    248 <table border="1" class="docutils"> 
     264<a class="mochidef reference" href="#fn-fade">fade(element[, options])</a>:</p> 
     265<blockquote> 
     266<p>Fades an <tt class="docutils literal"><span class="pre">element</span></tt> using the <a class="mochiref reference" href="#fn-opacity">Opacity</a> effect. Once 
     267the effect has completed, the <tt class="docutils literal"><span class="pre">element</span></tt> will be hidden with 
     268<a class="mochiref reference" href="Style.html#fn-hideelement">MochiKit.Style.hideElement</a> and the original element 
     269opacity will be restored. The available <tt class="docutils literal"><span class="pre">options</span></tt> are identical 
     270to the <a class="mochiref reference" href="#fn-opacity">Opacity</a> effect.</p> 
     271<dl class="docutils"> 
     272<dt>element:</dt> 
     273<dd>An element ID string or a DOM node (see 
     274<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     275<dt>options:</dt> 
     276<dd><table border="1" class="first last docutils"> 
    249277<colgroup> 
    250278<col width="12%" /> 
     
    260288</tbody> 
    261289</table> 
    262 <dl class="docutils"
     290</dd
    263291<dt><em>Availability</em>:</dt> 
    264292<dd>Available in MochiKit 1.4+</dd> 
     
    269297<a class="mochidef reference" href="#fn-appear">appear(element [, options])</a>:</p> 
    270298<blockquote> 
    271 <p>Slowly show an invisible element.</p> 
    272 <p>options:</p> 
    273 <table border="1" class="docutils"> 
    274 <colgroup> 
    275 <col width="36%" /> 
    276 <col width="64%" /> 
     299<p>Slowly shows an <tt class="docutils literal"><span class="pre">element</span></tt> using the <a class="mochiref reference" href="#fn-opacity">Opacity</a> effect. 
     300If the <tt class="docutils literal"><span class="pre">element</span></tt> has <tt class="docutils literal"><span class="pre">&quot;display:</span> <span class="pre">none&quot;</span></tt> style it will be changed 
     301to <tt class="docutils literal"><span class="pre">&quot;display:</span> <span class="pre">block&quot;</span></tt> with <a class="mochiref reference" href="Style.html#fn-showelement">MochiKit.Style.showElement</a>. 
     302The available options are identical to the <a class="mochiref reference" href="#fn-opacity">Opacity</a> effect.</p> 
     303<dl class="docutils"> 
     304<dt>element:</dt> 
     305<dd>An element ID string or a DOM node (see 
     306<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     307<dt>options:</dt> 
     308<dd><table border="1" class="first last docutils"> 
     309<colgroup> 
     310<col width="10%" /> 
     311<col width="90%" /> 
    277312</colgroup> 
    278313<tbody valign="top"> 
    279314<tr><td>from</td> 
    280 <td><tt class="docutils literal"><span class="pre">0.0</span></tt></td> 
     315<td><tt class="docutils literal"><span class="pre">element.opacity</span> <span class="pre">||</span> <span class="pre">0.0</span></tt></td> 
    281316</tr> 
    282317<tr><td>to</td> 
     
    285320</tbody> 
    286321</table> 
    287 <dl class="docutils"
     322</dd
    288323<dt><em>Availability</em>:</dt> 
    289324<dd>Available in MochiKit 1.4+</dd> 
     
    294329<a class="mochidef reference" href="#fn-puff">puff(element [, options])</a>:</p> 
    295330<blockquote> 
    296 <p>Make an element double size, and then make it disappear.</p> 
    297 <dl class="docutils"> 
     331<p>Make an element double size, and then make it disappear using the 
     332<a class="mochiref reference" href="#fn-scale">Scale</a> and <a class="mochiref reference" href="#fn-opacity">Opacity</a> effects. Once the effect 
     333has completed, the <tt class="docutils literal"><span class="pre">element</span></tt> will be hidden with 
     334<a class="mochiref reference" href="Style.html#fn-hideelement">MochiKit.Style.hideElement</a> and the original element 
     335size, position and opacity will be restored. Only a few options 
     336from <a class="mochiref reference" href="#fn-scale">Scale</a> are supported along with the 
     337<a class="mochiref reference" href="#fn-defaultoptions">DefaultOptions</a>.</p> 
     338<dl class="docutils"> 
     339<dt>element:</dt> 
     340<dd>An element ID string or a DOM node (see 
     341<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     342<dt>options:</dt> 
     343<dd><table border="1" class="first last docutils"> 
     344<colgroup> 
     345<col width="57%" /> 
     346<col width="43%" /> 
     347</colgroup> 
     348<tbody valign="top"> 
     349<tr><td>scaleContent</td> 
     350<td><tt class="docutils literal"><span class="pre">true</span></tt></td> 
     351</tr> 
     352<tr><td>scaleFromCenter</td> 
     353<td><tt class="docutils literal"><span class="pre">true</span></tt></td> 
     354</tr> 
     355</tbody> 
     356</table> 
     357</dd> 
    298358<dt><em>Availability</em>:</dt> 
    299359<dd>Available in MochiKit 1.4+</dd> 
     
    306366<p>Blind an element up, changing its vertical size to 0.</p> 
    307367<dl class="docutils"> 
     368<dt>element:</dt> 
     369<dd>An element ID string or a DOM node (see 
     370<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    308371<dt><em>Availability</em>:</dt> 
    309372<dd>Available in MochiKit 1.4+</dd> 
     
    316379<p>Blind an element down, restoring its vertical size.</p> 
    317380<dl class="docutils"> 
     381<dt>element:</dt> 
     382<dd>An element ID string or a DOM node (see 
     383<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    318384<dt><em>Availability</em>:</dt> 
    319385<dd>Available in MochiKit 1.4+</dd> 
     
    326392<p>A switch-off like effect, making the element disappear.</p> 
    327393<dl class="docutils"> 
     394<dt>element:</dt> 
     395<dd>An element ID string or a DOM node (see 
     396<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    328397<dt><em>Availability</em>:</dt> 
    329398<dd>Available in MochiKit 1.4+</dd> 
     
    335404<blockquote> 
    336405<p>Make the element fall and fade.</p> 
    337 <p>options:</p> 
    338 <table border="1" class="docutils"> 
     406<dl class="docutils"> 
     407<dt>element:</dt> 
     408<dd>An element ID string or a DOM node (see 
     409<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     410<dt>options:</dt> 
     411<dd><table border="1" class="first last docutils"> 
    339412<colgroup> 
    340413<col width="53%" /> 
     
    347420</tbody> 
    348421</table> 
    349 <dl class="docutils"
     422</dd
    350423<dt><em>Availability</em>:</dt> 
    351424<dd>Available in MochiKit 1.4+</dd> 
     
    358431<p>Shake an element from left to right.</p> 
    359432<dl class="docutils"> 
     433<dt>element:</dt> 
     434<dd>An element ID string or a DOM node (see 
     435<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    360436<dt><em>Availability</em>:</dt> 
    361437<dd>Available in MochiKit 1.4+</dd> 
     
    368444<p>Slide an element down.</p> 
    369445<dl class="docutils"> 
     446<dt>element:</dt> 
     447<dd>An element ID string or a DOM node (see 
     448<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    370449<dt><em>Availability</em>:</dt> 
    371450<dd>Available in MochiKit 1.4+</dd> 
     
    378457<p>Slide an element up.</p> 
    379458<dl class="docutils"> 
     459<dt>element:</dt> 
     460<dd>An element ID string or a DOM node (see 
     461<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    380462<dt><em>Availability</em>:</dt> 
    381463<dd>Available in MochiKit 1.4+</dd> 
     
    389471the top left corner.</p> 
    390472<dl class="docutils"> 
     473<dt>element:</dt> 
     474<dd>An element ID string or a DOM node (see 
     475<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    391476<dt><em>Availability</em>:</dt> 
    392477<dd>Available in MochiKit 1.4+</dd> 
     
    399484<p>Restore the size of an element.</p> 
    400485<dl class="docutils"> 
     486<dt>element:</dt> 
     487<dd>An element ID string or a DOM node (see 
     488<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    401489<dt><em>Availability</em>:</dt> 
    402490<dd>Available in MochiKit 1.4+</dd> 
     
    409497<p>Shrink an element to its center.</p> 
    410498<dl class="docutils"> 
     499<dt>element:</dt> 
     500<dd>An element ID string or a DOM node (see 
     501<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    411502<dt><em>Availability</em>:</dt> 
    412503<dd>Available in MochiKit 1.4+</dd> 
     
    418509<blockquote> 
    419510<p>Switch an element between appear and fade.</p> 
    420 <p>options:</p> 
    421 <table border="1" class="docutils"> 
     511<dl class="docutils"> 
     512<dt>element:</dt> 
     513<dd>An element ID string or a DOM node (see 
     514<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
     515<dt>options:</dt> 
     516<dd><table border="1" class="first last docutils"> 
    422517<colgroup> 
    423518<col width="43%" /> 
     
    430525</tbody> 
    431526</table> 
     527</dd> 
     528</dl> 
    432529<p>pulses controls the number of pulses made during the effect.</p> 
    433530<dl class="docutils"> 
     
    442539<p>Reduce first the vertical size, and then the horizontal size.</p> 
    443540<dl class="docutils"> 
     541<dt>element:</dt> 
     542<dd>An element ID string or a DOM node (see 
     543<a class="mochiref reference" href="DOM.html#fn-getelement">MochiKit.DOM.getElement</a>).</dd> 
    444544<dt><em>Availability</em>:</dt> 
    445545<dd>Available in MochiKit 1.4+</dd> 
     
    529629<a class="mochidef reference" href="#fn-parallel">Parallel(effects [, options])</a>:</p> 
    530630<blockquote> 
    531 <p>Launch effects in parallel.</p> 
    532 <dl class="docutils"> 
     631<p>Launch a list of <tt class="docutils literal"><span class="pre">effects</span></tt> in parallel.</p> 
     632<dl class="docutils"> 
     633<dt>effects:</dt> 
     634<dd>An array of instantiated effect objects. Note that they must 
     635all have <tt class="docutils literal"><span class="pre">sync</span></tt> set to <tt class="docutils literal"><span class="pre">true</span></tt>.</dd> 
     636<dt>options:</dt> 
     637<dd>See <a class="mochiref reference" href="#fn-defaultoptions">DefaultOptions</a>.</dd> 
    533638<dt><em>Availability</em>:</dt> 
    534639<dd>Available in MochiKit 1.4+</dd> 
  • mochikit/trunk/doc/rst/MochiKit/Visual.rst

    r1329 r1330  
    154154 
    155155    effect: 
    156         One of the visual pairs to use. Choose between 'slide', 'blind', 
    157         'appear', and 'size'. 
     156        One of the visual pairs to use: 
     157 
     158        ============ ========================================= 
     159        ``"appear"`` :mochiref:`appear` and :mochiref:`fade` 
     160        ``"blind"``  :mochiref:`blindUp` and :mochiref:`blindDown` 
     161        ``"size"``   :mochiref:`grow` and :mochiref:`shrink` 
     162        ``"slide"``  :mochiref:`slideUp` and :mochiref:`slideDown` 
     163        ============ ========================================= 
    158164 
    159165    options: 
     
    211217------------------- 
    212218 
    213 :mochidef:`fade(element [, options])`: 
    214  
    215     Change the opacity of an element until making it disappear. 
    216  
    217     options: 
    218  
    219     ====== ============================================= 
    220     from   ``element.opacity || 1.0`` 
    221     to     ``0.0`` 
    222     ====== ============================================= 
     219:mochidef:`fade(element[, options])`: 
     220 
     221    Fades an ``element`` using the :mochiref:`Opacity` effect. Once 
     222    the effect has completed, the ``element`` will be hidden with 
     223    :mochiref:`MochiKit.Style.hideElement` and the original element 
     224    opacity will be restored. The available ``options`` are identical 
     225    to the :mochiref:`Opacity` effect. 
     226 
     227    element: 
     228        An element ID string or a DOM node (see 
     229        :mochiref:`MochiKit.DOM.getElement`). 
     230 
     231    options: 
     232        ====== ============================================= 
     233        from   ``element.opacity || 1.0`` 
     234        to     ``0.0`` 
     235        ====== ============================================= 
    223236 
    224237    *Availability*: 
     
    228241:mochidef:`appear(element [, options])`: 
    229242 
    230     Slowly show an invisible element. 
    231  
    232     options: 
    233  
    234     ===== ========= 
    235     from  ``0.0`` 
    236     to    ``1.0`` 
    237     ===== ========= 
     243    Slowly shows an ``element`` using the :mochiref:`Opacity` effect. 
     244    If the ``element`` has ``"display: none"`` style it will be changed 
     245    to ``"display: block"`` with :mochiref:`MochiKit.Style.showElement`. 
     246    The available options are identical to the :mochiref:`Opacity` effect. 
     247 
     248    element: 
     249        An element ID string or a DOM node (see 
     250        :mochiref:`MochiKit.DOM.getElement`). 
     251 
     252    options: 
     253        ===== ============================================= 
     254        from  ``element.opacity || 0.0`` 
     255        to    ``1.0`` 
     256        ===== ============================================= 
    238257 
    239258    *Availability*: 
     
    243262:mochidef:`puff(element [, options])`: 
    244263 
    245     Make an element double size, and then make it disappear. 
     264    Make an element double size, and then make it disappear using the 
     265    :mochiref:`Scale` and :mochiref:`Opacity` effects. Once the effect 
     266    has completed, the ``element`` will be hidden with 
     267    :mochiref:`MochiKit.Style.hideElement` and the original element 
     268    size, position and opacity will be restored. Only a few options 
     269    from :mochiref:`Scale` are supported along with the 
     270    :mochiref:`DefaultOptions`. 
     271 
     272    element: 
     273        An element ID string or a DOM node (see 
     274        :mochiref:`MochiKit.DOM.getElement`). 
     275 
     276    options: 
     277        ================ ============ 
     278        scaleContent     ``true`` 
     279        scaleFromCenter  ``true`` 
     280        ================ ============ 
    246281 
    247282    *Availability*: 
     
    253288    Blind an element up, changing its vertical size to 0. 
    254289 
     290    element: 
     291        An element ID string or a DOM node (see 
     292        :mochiref:`MochiKit.DOM.getElement`). 
     293 
    255294    *Availability*: 
    256295        Available in MochiKit 1.4+ 
     
    261300    Blind an element down, restoring its vertical size. 
    262301 
     302    element: 
     303        An element ID string or a DOM node (see 
     304        :mochiref:`MochiKit.DOM.getElement`). 
     305 
    263306    *Availability*: 
    264307        Available in MochiKit 1.4+ 
     
    269312    A switch-off like effect, making the element disappear. 
    270313 
     314    element: 
     315        An element ID string or a DOM node (see 
     316        :mochiref:`MochiKit.DOM.getElement`). 
     317 
    271318    *Availability*: 
    272319        Available in MochiKit 1.4+ 
     
    277324    Make the element fall and fade. 
    278325 
    279     options: 
    280  
    281     ======== ======= 
    282     distance ``100`` 
    283     ======== ======= 
     326    element: 
     327        An element ID string or a DOM node (see 
     328        :mochiref:`MochiKit.DOM.getElement`). 
     329 
     330    options: 
     331        ======== ======= 
     332        distance ``100`` 
     333        ======== ======= 
    284334 
    285335    *Availability*: 
     
    291341    Shake an element from left to right. 
    292342 
     343    element: 
     344        An element ID string or a DOM node (see 
     345        :mochiref:`MochiKit.DOM.getElement`). 
     346 
    293347    *Availability*: 
    294348        Available in MochiKit 1.4+ 
     
    299353    Slide an element down. 
    300354 
     355    element: 
     356        An element ID string or a DOM node (see 
     357        :mochiref:`MochiKit.DOM.getElement`). 
     358 
    301359    *Availability*: 
    302360        Available in MochiKit 1.4+ 
     
    306364 
    307365    Slide an element up. 
     366 
     367    element: 
     368        An element ID string or a DOM node (see 
     369        :mochiref:`MochiKit.DOM.getElement`). 
    308370 
    309371    *Availability*: 
     
    316378    the top left corner. 
    317379 
     380    element: 
     381        An element ID string or a DOM node (see 
     382        :mochiref:`MochiKit.DOM.getElement`). 
     383 
    318384    *Availability*: 
    319385        Available in MochiKit 1.4+ 
     
    324390    Restore the size of an element. 
    325391 
     392    element: 
     393        An element ID string or a DOM node (see 
     394        :mochiref:`MochiKit.DOM.getElement`). 
     395 
    326396    *Availability*: 
    327397        Available in MochiKit 1.4+ 
     
    332402    Shrink an element to its center. 
    333403 
     404    element: 
     405        An element ID string or a DOM node (see 
     406        :mochiref:`MochiKit.DOM.getElement`). 
     407 
    334408    *Availability*: 
    335409        Available in MochiKit 1.4+ 
     
    340414    Switch an element between appear and fade. 
    341415 
    342     options: 
    343  
    344     ====== ======== 
    345     pulses ``null`` 
    346     ====== ======== 
     416    element: 
     417        An element ID string or a DOM node (see 
     418        :mochiref:`MochiKit.DOM.getElement`). 
     419 
     420    options: 
     421        ====== ======== 
     422        pulses ``null`` 
     423        ====== ======== 
    347424 
    348425    pulses controls the number of pulses made during the effect. 
     
    355432 
    356433    Reduce first the vertical size, and then the horizontal size. 
     434 
     435    element: 
     436        An element ID string or a DOM node (see 
     437        :mochiref:`MochiKit.DOM.getElement`). 
    357438 
    358439    *Availability*: 
     
    418499:mochidef:`Parallel(effects [, options])`: 
    419500 
    420     Launch effects in parallel. 
     501    Launch a list of ``effects`` in parallel. 
     502 
     503    effects: 
     504        An array of instantiated effect objects. Note that they must 
     505        all have ``sync`` set to ``true``. 
     506 
     507    options: 
     508        See :mochiref:`DefaultOptions`. 
    421509 
    422510    *Availability*: