Changeset 1344

Show
Ignore:
Timestamp:
03/24/08 08:42:28 (3 months ago)
Author:
cederberg@gmail.com
Message:

Updated the overview text for MochiKit.Visual.

Files:

Legend:

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

    r1343 r1344  
    5555effects are ported from <a class="reference" href="http://script.aculo.us">Scriptaculous</a>.</p> 
    5656<div class="section"> 
     57<h2><a id="animations-effects" name="animations-effects">Animations &amp; Effects</a></h2> 
     58<p>Dynamic or animated effects are managed by a basic looping service (see 
     59<a class="mochiref reference" href="#fn-base">Base</a>). The effect looping is controlled by timers that are invoked 
     60at regular and short intervals while the effect is executing. The base looping 
     61service takes the current system time into consideration, automatically 
     62skipping effect steps on execution delays.</p> 
     63<p>The effect classes need only handle dynamic updates based on a floating-point 
     64number between <tt class="docutils literal"><span class="pre">0.0</span></tt> and <tt class="docutils literal"><span class="pre">1.0</span></tt> (the effect position). This effect position 
     65may also be manipulated by <a class="mochiref reference" href="#fn-transitions">Transitions</a> to provide non-linear 
     66updates, which may further enhance the visual effect.</p> 
     67<p>The effect timer and transitions can be controlled through a set of 
     68<a class="mochiref reference" href="#fn-defaultoptions">DefaultOptions</a> that are available for all effect classes.</p> 
     69</div> 
     70<div class="section"> 
    5771<h2><a id="the-effects-queue" name="the-effects-queue">The Effects Queue</a></h2> 
    5872<p>When you create effects based on user input (mouse clicks for example), it can 
     
    6074same time. To manage this problem, the Queue mechanism has been introduced: 
    6175it's responsible for running the effects as you desired.</p> 
    62 <p>By default, you have one Queue called 'global', and the effects run in 'parallel' 
    63 (see default options). Every effects have a queue option to customize this. 
    64 It can be a string, the scope is then global:</p> 
     76<p>By default, you have one Queue called <tt class="docutils literal"><span class="pre">'global'</span></tt>, and the effects run in 
     77<tt class="docutils literal"><span class="pre">'parallel'</span></tt> (see <a class="mochiref reference" href="#fn-defaultoptions">DefaultOptions</a>). Every effect has a <tt class="docutils literal"><span class="pre">queue</span></tt> 
     78option to customize this. It's value can be a string, thereby using the 
     79<tt class="docutils literal"><span class="pre">global</span></tt> scope:</p> 
    6580<ul class="simple"> 
    66 <li><cite>start</cite>: the effect will be run before any other;</li> 
    67 <li><cite>end</cite>: the effect will be run after any other;</li> 
    68 <li><cite>break</cite>: every other effects break when the the effect start;</li> 
    69 <li><cite>parallel</cite>: the effect run normally with others.</li> 
     81<li><cite>front</cite>: the effect will be run before any other non-started effect;</li> 
     82<li><cite>end</cite>: the effect will be run when all other effects have finished;</li> 
     83<li><cite>break</cite>: every other effect is immediately finalized when the the effect start;</li> 
     84<li><cite>parallel</cite>: the effect runs in parallel with other effects.</li> 
    7085</ul> 
    71 <p>But you have even more control if you use an array with the following keys:</p> 
     86<p>But you have even more control if you use an object with the following 
     87property keys:</p> 
    7288<ul class="simple"> 
    73 <li><cite>position</cite> takes a value listed above;</li> 
    74 <li><cite>scope</cite> manages how the information has to be taken. If it's <cite>global</cite> 
    75 then it's the same information for every effects. Otherwise you can define 
    76 your own scode. For example, if you add an effect on a specified element, 
    77 you may use the element id as scode;</li> 
    78 <li><cite>limit</cite> defines how many effects can run in the current scode. If an 
    79 effect is added whereas the limit is reached, it will never be run (it's 
    80 lost).</li> 
     89<li><cite>position</cite> takes one of the values listed above;</li> 
     90<li><cite>scope</cite> contains the queue name. If it's <tt class="docutils literal"><span class="pre">&quot;global&quot;</span></tt> the effect will use the 
     91default queue, otherwise you can define your own queue name. For example, if 
     92you add an effect on a specified element, you may use the element id as scope;</li> 
     93<li><cite>limit</cite> defines how many effects can be stored in the queue at a single time. 
     94If an effect is added when the limit has been reached, it will never be run 
     95(it's lost).</li> 
    8196</ul> 
    8297</div> 
  • mochikit/trunk/doc/rst/MochiKit/Visual.rst

    r1343 r1344  
    5252 
    5353 
     54Animations & Effects 
     55-------------------- 
     56 
     57Dynamic or animated effects are managed by a basic looping service (see 
     58:mochiref:`Base`). The effect looping is controlled by timers that are invoked 
     59at regular and short intervals while the effect is executing. The base looping 
     60service takes the current system time into consideration, automatically 
     61skipping effect steps on execution delays. 
     62 
     63The effect classes need only handle dynamic updates based on a floating-point 
     64number between ``0.0`` and ``1.0`` (the effect position). This effect position 
     65may also be manipulated by :mochiref:`Transitions` to provide non-linear 
     66updates, which may further enhance the visual effect. 
     67 
     68The effect timer and transitions can be controlled through a set of 
     69:mochiref:`DefaultOptions` that are available for all effect classes. 
     70 
     71 
    5472The Effects Queue 
    5573----------------- 
     
    6078it's responsible for running the effects as you desired. 
    6179 
    62 By default, you have one Queue called 'global', and the effects run in 'parallel' 
    63 (see default options). Every effects have a queue option to customize this. 
    64 It can be a string, the scope is then global: 
    65      
    66 - `start`: the effect will be run before any other; 
    67 - `end`: the effect will be run after any other; 
    68 - `break`: every other effects break when the the effect start; 
    69 - `parallel`: the effect run normally with others. 
    70  
    71 But you have even more control if you use an array with the following keys: 
    72  
    73 - `position` takes a value listed above; 
    74 - `scope` manages how the information has to be taken. If it's `global`  
    75   then it's the same information for every effects. Otherwise you can define 
    76   your own scode. For example, if you add an effect on a specified element, 
    77   you may use the element id as scode; 
    78 - `limit` defines how many effects can run in the current scode. If an 
    79   effect is added whereas the limit is reached, it will never be run (it's 
    80   lost). 
     80By default, you have one Queue called ``'global'``, and the effects run in 
     81``'parallel'`` (see :mochiref:`DefaultOptions`). Every effect has a ``queue`` 
     82option to customize this. It's value can be a string, thereby using the 
     83``global`` scope: 
     84 
     85- `front`: the effect will be run before any other non-started effect; 
     86- `end`: the effect will be run when all other effects have finished; 
     87- `break`: every other effect is immediately finalized when the the effect start; 
     88- `parallel`: the effect runs in parallel with other effects. 
     89 
     90But you have even more control if you use an object with the following 
     91property keys: 
     92 
     93- `position` takes one of the values listed above; 
     94- `scope` contains the queue name. If it's ``"global"`` the effect will use the 
     95  default queue, otherwise you can define your own queue name. For example, if 
     96  you add an effect on a specified element, you may use the element id as scope; 
     97- `limit` defines how many effects can be stored in the queue at a single time. 
     98  If an effect is added when the limit has been reached, it will never be run 
     99  (it's lost). 
    81100 
    82101