Ticket #292 (closed enhancement: fixed)

Opened 5 months ago

Last modified 4 months ago

MochiKit.Visual documentation API adjustments

Reported by: cederberg@gmail.com Assigned to: somebody
Priority: normal Milestone: MochiKit 1.4
Component: component1 Version:
Severity: normal Keywords:
Cc:

Description

Here follows a diff for a first batch of minor API doc adjustments for MochiKit.Visual. The changes to the other parts are not easy to diff for me, since I've already changed the doc structure (as per ticket #291).

Index: doc/rst/MochiKit/Visual.rst
===================================================================
--- doc/rst/MochiKit/Visual.rst (revision 1325)
+++ doc/rst/MochiKit/Visual.rst (working copy)
@@ -24,8 +24,7 @@
 Description
 ===========
 
-MochiKit.Visual provides visual effects and support functions for
-visuals.
+MochiKit.Visual provides visual effects and animations for HTML elements.
 
 
 Dependencies
@@ -40,7 +39,7 @@
 Overview
 ========
 
-MochiKit.Visual provides different visual effect: rounded corners and
+MochiKit.Visual provides different visual effects: rounded corners and
 animations for your HTML elements. Rounded corners are created

@@ -62,7 +90,7 @@
     Rounds all of the elements that match the ``tagName`` and
     ``className`` specifiers, using the options provided.  ``tagName``
     or ``className`` can be ``null`` to match all tags or classes.
-    For more information about the options, see the
+    For more information about the ``options``, see the
     :mochiref:`roundElement` function.
 
     *Availability*:
@@ -71,24 +99,28 @@
 
 :mochidef:`roundElement(element[, options])`:
 
-    Immediately round the corners of the specified element.  The
-    element can be given as either a string with the element ID, or as
-    an element object.
+    Immediately round the corners of the specified ``element``.
 
-    The options mapping has the following defaults:
+    element:
+        An element ID string or a DOM node (see
+        :mochiref:`MochiKit.DOM.getElement`).
 
-    ========= =================
-    corners   ``"all"``
-    color     ``"fromElement"``
-    bgColor   ``"fromParent"``
-    blend     ``true``
-    border    ``false``
-    compact   ``false``
-    ========= =================
+    options: 
+        The ``options`` mapping has the following defaults:
 
+        ========= =================
+        corners   ``"all"``
+        color     ``"fromElement"``
+        bgColor   ``"fromParent"``
+        blend     ``true``
+        border    ``false``
+        compact   ``false``
+        ========= =================
+
+    The ``options`` parameters can have following values:
+
     corners:
-
-        specifies which corners of the element should be rounded.
+        Specifies which corners of the element should be rounded.
         Choices are:
 
         - all
@@ -103,7 +135,7 @@
             ``"tl br"``: top-left and bottom-right corners are rounded
 
     blend:
-        specifies whether the color and background color should be
+        Specifies whether the color and background color should be
         blended together to produce the border color.
 
     *Availability*:
@@ -112,23 +144,37 @@
 
 :mochidef:`toggle(element[, effect[, options]])`:
 
-    Toggle an element between visible and invisible state using an effect.
+    Toggle an ``element`` between visible and invisible state using an
+    effect.
 
+    element:
+        An element ID string or a DOM node (see
+        :mochiref:`MochiKit.DOM.getElement`).
+
     effect:
-        One of the visual pairs to use, between 'slide', 'blind',
+        One of the visual pairs to use. Choose between 'slide', 'blind',
         'appear', and 'size'.
 
+    options:
+        The optional effect options (see effect functions for details).
+
     *Availability*:
         Available in MochiKit 1.4+
 
 
 :mochidef:`tagifyText(element[, tagifyStyle])`:
 
-    Transform a node text into nodes containing one letter by tag.
+    Transform the node text into ``SPAN`` nodes each containing a single
+    letter. Only text nodes that are immediate children will be modified
+    by this function.
 
+    element:
+        An element ID string or a DOM node (see
+        :mochiref:`MochiKit.DOM.getElement`).
+
     tagifyStyle:
-        style to apply to character nodes, default to 'position:
-        relative'.
+        Style to apply to each new ``SPAN`` node, defaults to
+        ``'position: relative'``.
 
     *Availability*:
         Available in MochiKit 1.4+
@@ -136,12 +182,168 @@
 
 :mochidef:`multiple(elements, effect[, options])`:
 
-    Launch the same effect on a list of elements.
+    Launch the same effect on a list of ``elements``.
 
+    element:
+        A list of element ID strings or a DOM nodes (see
+        :mochiref:`MochiKit.DOM.getElement`).
+
+    effect:
+        An effect class constructor function.
+
+    options:
+        The optional effect options (see effect classes for details).
+
     *Availability*:
         Available in MochiKit 1.4+

Change History

03/11/08 15:50:57 changed by bob@redivi.com

The patch looks good, but Trac mangled it. Could you email me the patch, post it to the list, or post a URL to it somewhere so that I can cleanly apply it?

03/12/08 07:43:43 changed by bob@redivi.com

  • status changed from new to closed.
  • resolution set to fixed.