Skip to content

Commit 088d22b

Browse files
author
lauren mccarthy
committed
updating docs
1 parent f796db3 commit 088d22b

File tree

7 files changed

+39
-13
lines changed

7 files changed

+39
-13
lines changed

docs/css/main.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
Base styles: opinionated defaults
1111
========================================================================== */
1212

13+
td {
14+
vertical-align: top;
15+
font-size: 1.2em;
16+
padding-bottom: 0.75em;
17+
}
18+
19+
td:first-child {
20+
padding-right: 0.5em;
21+
}
1322

1423
/*
1524
//////////////////////////////////////////////////
@@ -257,7 +266,7 @@ section#reference h2 {
257266
}
258267

259268
#reference .core, #reference .addon {
260-
color: #222;
269+
color: #704F21;
261270
}
262271

263272
html,

docs/yuidoc-p5-theme-src/scripts/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ require([
1717
'underscore',
1818
'backbone',
1919
'App'], function(_, Backbone, App) {
20+
21+
22+
require(['router']);
2023

2124
// Set collections
2225
App.collections = ['allItems', 'classes', 'events', 'methods', 'properties', 'p5.sound', 'p5.dom'];
@@ -62,6 +65,7 @@ require([
6265
// Get class items (methods, properties, events)
6366
_.each(items, function(el, idx, array) {
6467

68+
el.hash = App.router.getHash(el);
6569
if (el.itemtype) {
6670
if (el.itemtype === "method") {
6771
App.methods.push(el);
@@ -93,6 +97,5 @@ require([
9397

9498

9599

96-
require(['router']);
97100
});
98101
});

docs/yuidoc-p5-theme-src/scripts/tpl/class.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ <h4>Fields</h4>
2121
<% if (methods.length > 0) { %>
2222
<h4>Methods</h4>
2323
<p>
24+
<table>
2425
<% _.each(methods, function(item) { %>
25-
<a href="<%=item.hash%>" <% if (item.module !== module) { %>class="addon"<% } %>><%=item.name%><% if (item.itemtype === 'method') { %>()<%}%></a>: <%= item.description %>
26-
<br>
26+
<tr>
27+
<td><a href="<%=item.hash%>" <% if (item.module !== module) { %>class="addon"<% } %>><%=item.name%><% if (item.itemtype === 'method') { %>()<%}%></a></td><td><%= item.description %></td>
28+
</tr>
2729
<% }); %>
30+
</table>
2831
</p>
2932
<% } %>

docs/yuidoc-p5-theme-src/scripts/tpl/item.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,32 +93,35 @@ <h4>Syntax</h4>
9393
<% if (item.params) { %>
9494
<div class="params">
9595
<h4>Parameters</h4>
96-
<ul>
96+
<table>
9797
<% for (var i=0; i<item.params.length; i++) { %>
98-
<li>
98+
<tr>
99+
<td>
99100
<% var p = item.params[i] %>
100101
<% if (p.optional) { %>
101102
<code class="language-javascript">[<%=p.name%>]</code>
102103
<% } else { %>
103104
<code class="language-javascript"><%=p.name%></code>
104105
<% } %>
105106
<%if (p.optdefault) { %>=<%=p.optdefault%><% } %>
107+
</td>
108+
<td>
106109
<% if (p.type) { %>
107110
<span class="param-type label label-info"><%=p.type%></span>: <%=p.description%></span>
108111
<% } %>
109112
<% if (p.multiple) {%>
110113
<span class="flag multiple" title="This argument may occur one or more times.">multiple</span>
111114
<% } %>
112-
</li>
115+
</td>
116+
</tr>
113117
<% } %>
114-
</ul>
118+
</table>
115119
</div>
116120
<% } %>
117121

118122
<% if (item.return) { %>
119123
<div>
120124
<h4>Returns</h4>
121-
122125
<% if (item.return.type) { %>
123126
<p><span class="param-type label label-info"><%=item.return.type%></span>: <%= item.return.description %></p>
124127
<% } %>

lib/addons/p5.dom.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! p5.dom.js v0.0.1 July 31, 2014 */
1+
/*! p5.dom.js v0.1.0 August 6, 2014 */
22
/**
33
* <p>The web is much more than just canvas and p5.dom makes it easy to interact
44
* with other HTML5 objects, including text, hyperlink, image, input, video,
@@ -600,7 +600,10 @@ var p5DOM = (function(){
600600

601601

602602
/**
603-
* A class to describe...
603+
* Extends p5.Element to handle audio and video. In addition to the methods
604+
* of p5.Element, it also contains methods for controlling media. It is not
605+
* called directly, but p5.MediaElements are created by calling createVideo,
606+
* createAudio, and createCapture.
604607
*
605608
* @class p5.MediaElement
606609
* @constructor

src/objects/p5.Element.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ define(function(require) {
88
var p5 = require('core');
99

1010
/**
11-
* A class to describe...
11+
* Base class for all elements added to a sketch, including canvas,
12+
* graphics buffers, and other HTML elements. Methods in blue are
13+
* included in the core functionality, methods in black are added
14+
* with the p5.dom library. It is not called directly, but p5.Element
15+
* objects are created by calling createCanvas, createGraphics,
16+
* or in the p5.dom library, createDiv, createImg, createInput, etc.
1217
*
1318
* @class p5.Element
1419
* @constructor

src/objects/p5.Graphics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @module Rendering
33
* @submodule Rendering
4-
* @for p5.Graphics
4+
* @for p5
55
*/
66
define(function(require) {
77

0 commit comments

Comments
 (0)