Skip to content

Commit

Permalink
doc styling
Browse files Browse the repository at this point in the history
  • Loading branch information
anutron committed Feb 9, 2010
1 parent 8a8a61f commit 4532ef9
Show file tree
Hide file tree
Showing 29 changed files with 397 additions and 392 deletions.
4 changes: 2 additions & 2 deletions Docs/Core/Depender.md
Expand Up @@ -3,7 +3,7 @@ Singleton: Depender {#Depender}

Loads dependencies from MooTools script repositories.

### Implements:
### Implements

* [Events][], [Options][]

Expand Down Expand Up @@ -57,7 +57,7 @@ Includes a collection of scripts.

1. libs - (*mixed*) either a string (a url to fetch a json object) or an object (the data itself - see below).

### Returns:
### Returns

* *object* - the *Depender* object.

Expand Down
20 changes: 10 additions & 10 deletions Docs/Core/Log.md
Expand Up @@ -3,21 +3,21 @@ Class: Log {#Log}

A Utility Class which provides a simple way to log messages from within other classes.

### Syntax:
### Syntax

#### For new classes:
#### For new classes

var MyClass = new Class({ Implements: Log });

#### For existing classes:
#### For existing classes

MyClass.implement(new Log);

#### Stand alone

var myLog = new Log;

### Example:
### Example

var Test = new Class({
Implements: Log,
Expand All @@ -31,7 +31,7 @@ A Utility Class which provides a simple way to log messages from within other cl
- Log.log is an unique global callback to which all instances of Log report. Its default behavior is to relay the message via console.log (if present), and stack the messages in Log.logged
- If you use a bookmarklet-based logger, make sure to call Log.enableLog() once it has loaded.

### See Also:
### See Also

- [Class][]

Expand All @@ -40,11 +40,11 @@ Log Method: log {#Log:log}

Passes a message to the logger.

### Syntax:
### Syntax

myClass.log(msg[, msg[, msg[, ...]]]);

### Arguments:
### Arguments

1. Any number of arguments.

Expand All @@ -53,7 +53,7 @@ Log Method: enableLog {#Log:enableLog}

Enabled logging to the console, logs everything in the stack, and then clears the stack.

### Syntax:
### Syntax

myClass.enableLog();

Expand All @@ -62,7 +62,7 @@ Log Method: disableLog {#Log:disableLog}

Disables logging to the console and instead subsequent calls to [log][Log:log] will be stored on the stack.

### Syntax:
### Syntax

myClass.disableLog();

Expand All @@ -71,7 +71,7 @@ Log Method: resetLog {#Log:resetLog}

Clears the log stack.

### Syntax:
### Syntax

myClass.resetLog();

Expand Down
34 changes: 17 additions & 17 deletions Docs/Drag/Drag.Move.md
Expand Up @@ -4,24 +4,24 @@ Class: Drag.Move {#Drag-Move}
An extension to the base Drag class with additional functionality for dragging an Element. Supports snapping and droppables.
Inherits methods, properties, options and events from [Drag][].

### Note:
### Note

Drag.Move requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/).


Drag.Move Method: constructor {#Drag-Move:constructor}
-------------------------------------------------

### Syntax:
### Syntax

var myMove = new Drag.Move(myElement[, options]);

### Arguments:
### Arguments

1. el - (*element*) The Element to apply the drag to.
2. options - (*object*, optional) The options object. See below.

### Options:
### Options

All the base Drag options, plus:

Expand All @@ -31,13 +31,13 @@ All the base Drag options, plus:
* includeMargins - (*boolean*; defaults to *true*) This option only applies when the container option is set. If *true* (the default) the margins are included in the calculations for the bounding box of the draggable item. This means that if you have a margin on your draggable then the border of the draggable can never touch the edge of the container. Setting it to false ignores this margin.
* checkDroppables - (*boolean*; defaults to *true*) Checks against the droppables on drag if *true*.

### Events:
### Events

* drop - Executed when the element drops. Passes as argument the element and the element dropped on and the event. If dropped on nothing, the second argument is null.
* leave - Executed when the element leaves one of the droppables.
* enter - Executed when the element enters one of the droppables.

### Example:
### Example

var myDrag = new Drag.Move('draggable', {

Expand All @@ -58,18 +58,18 @@ All the base Drag options, plus:

});

### Notes:
### Notes

- Drag.Move requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/).
- Drag.Move supports either position absolute or relative. If no position is found, absolute will be set.

### Demos:
### Demos

* Drag.Cart - <http://demos.mootools.net/Drag.Cart>
* Drag.Absolutely - <http://demos.mootools.net/Drag.Absolutely>
* DragDrop - <http://demos.mootools.net/DragDrop>

### See Also:
### See Also

- [Drag][]

Expand All @@ -80,11 +80,11 @@ Drag.Move Method: stop {#Drag-Move:stop}

Fires the 'drop' event and calls the Drag Class stop method.

### Syntax:
### Syntax

myMove.stop();

### Example:
### Example

var myMove = new Drag.Move(myElement, {
onSnap: function(){ // due to MooTool's inheritance, all [Drag][]'s Events are also available.
Expand All @@ -97,7 +97,7 @@ Fires the 'drop' event and calls the Drag Class stop method.
}
});

### See Also:
### See Also

- [Drag:stop][]

Expand All @@ -115,27 +115,27 @@ Element Method: makeDraggable {#Element:makeDraggable}

Adds drag-to-move behavior to an Element using supplied options.

### Syntax:
### Syntax

var myDrag = myElement.makeDraggable([options]);

### Arguments:
### Arguments

1. options - (*object*, optional) See [Drag][] and [Drag.Move](#Drag-Move) for acceptable options.

### Returns:
### Returns

* (*object*) The Drag.Move instance that was created.

### Example:
### Example

var myDrag = $('myElement').makeDraggable({
onComplete: function(){
alert('done dragging');
}
});

### See Also:
### See Also

- [Drag][], [Drag.Move](#Drag-Move)

Expand Down
46 changes: 23 additions & 23 deletions Docs/Drag/Drag.md
Expand Up @@ -3,24 +3,24 @@ Class: Drag {#Drag}

Enables the modification of two CSS properties of an Element based on the position of the mouse while the mouse button is down.

### Implements:
### Implements

[Events][], [Chain][], [Options][]


Drag Method: constructor {#Drag:constructor}
--------------------------------------------

### Syntax:
### Syntax

var myDragInstance = new Drag(el[, options]);

### Arguments:
### Arguments

1. el - (*element*) The Element to apply the transformations to.
2. options - (*object*, optional) The options object.

### Options:
### Options

* grid - (*integer*: defaults to false) Distance in pixels for snap-to-grid dragging.
* handle - (*element*: defaults to the element passed in) The Element to act as the handle for the draggable element.
Expand All @@ -33,7 +33,7 @@ Drag Method: constructor {#Drag:constructor}
* preventDefault - (*boolean*: defaults to false) Calls preventDefault on the event while dragging. See [Event:preventDefault][]
* stopPropagation - (*boolean*: defaults to false) Prevents the event from "bubbling" up in the DOM tree. See [Event:stopPropagation][]

### Events:
### Events

* beforeStart - Executed before the Drag instance attaches the events. Receives the dragged element as an argument.
* start - Executed when the user starts to drag (on mousedown). Receives the dragged element as an argument.
Expand All @@ -42,7 +42,7 @@ Drag Method: constructor {#Drag:constructor}
* complete - Executed when the user completes the drag. Receives the dragged element and the event as arguments.
* cancel - Executed when the user has cancelled the drag. Receives the dragged element as an argument.

### Examples:
### Examples

var myDrag = new Drag('myDraggable', {
snap: 0,
Expand All @@ -61,11 +61,11 @@ Drag Method: constructor {#Drag:constructor}
modifiers: {x: 'scrollLeft', y: 'scrollTop'}
});

### Notes:
### Notes

- Drag requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/).

### See Also:
### See Also

- [W3Schools: CSS Units][]

Expand All @@ -76,23 +76,23 @@ Drag Method: attach {#Drag:attach}

Attaches the mouse listener to the handle, causing the Element to be draggable.

### Syntax:
### Syntax

myDrag.attach();

### Returns:
### Returns

* (*object*) This Drag instance.

### Examples:
### Examples

var myDrag = new Drag('myElement').detach(); //The Element can't be dragged.
$('myActivator').addEvent('click', function(){
alert('Ok, now you can drag.');
myDrag.attach();
});

### See Also:
### See Also

- [$][], [Element:makeDraggable][], [Drag:detach](#Drag:detach), [Element:addEvent][]

Expand All @@ -103,23 +103,23 @@ Drag Method: detach {#Drag:detach}

Detaches the mouse listener from the handle, preventing the Element from being dragged.

### Syntax:
### Syntax

myDrag.detach();

### Returns:
### Returns

* (*object*) This Drag instance.

### Examples:
### Examples

var myDrag = new Drag('myElement');
$('myDeactivator').addEvent('click', function(){
alert('No more dragging for you, Mister.');
myDrag.detach();
});

### See Also:
### See Also

- [$][], [Element:makeDraggable][], [Element:addEvent][]

Expand All @@ -130,15 +130,15 @@ Drag Method: stop {#Drag:stop}

Stops (removes) all attached events from the Drag instance. If the event is passed, it executes the 'complete' Event.

### Syntax:
### Syntax

myDrag.stop([event]);

### Arguments

1. event - (*event*) the Event that is fired (typically by mouseup). This is passed along to the 'complete' Event in addition to the element that was dragged. If you pass along any truth-y value (i.e. not *false*, *zero*, etc) the 'complete' event will be fired and that value will be passed to the 'complete' event.

### Examples:
### Examples

var myDrag = new Drag('myElement', {
onSnap: function(){
Expand All @@ -165,27 +165,27 @@ Element Method: makeResizable {#Element:makeResizable}

Adds drag-to-resize behavior to an Element using supplied options.

### Syntax:
### Syntax

var myResize = myElement.makeResizable([options]);

### Arguments:
### Arguments

1. options - (*object*, optional) See [Drag][#Drag] for acceptable options.

### Returns:
### Returns

* (*object*) The Drag instance that was created.

### Examples:
### Examples

var myResize = $('myElement').makeResizable({
onComplete: function(){
alert('Done resizing.');
}
});

### See Also:
### See Also

- [Drag](#Drag)

Expand Down

0 comments on commit 4532ef9

Please sign in to comment.