Merge remote branch 'origin/master'

This commit is contained in:
Jonathan Puckey 2011-06-09 23:21:21 +02:00
commit d688faf805
24 changed files with 7121 additions and 174 deletions

View file

@ -1,7 +1,7 @@
/** Handle the creation of HTML links to documented symbols. /** Handle the creation of HTML links to documented symbols.
@constructor @constructor
*/ */
function Link() { function Link(asCode) {
this.alias = ""; this.alias = "";
this.src = ""; this.src = "";
this.file = ""; this.file = "";
@ -9,6 +9,7 @@ function Link() {
this.innerName = ""; this.innerName = "";
this.classLink = false; this.classLink = false;
this.targetName = ""; this.targetName = "";
this.asCode = asCode;
this.target = function(targetName) { this.target = function(targetName) {
if (defined(targetName)) this.targetName = targetName; if (defined(targetName)) this.targetName = targetName;
@ -131,15 +132,18 @@ Link.prototype._makeSymbolLink = function(alias, parameters) {
if (parameters) { if (parameters) {
parameters = parameters.replace(/\,([^\s])/, ', $1') parameters = parameters.replace(/\,([^\s])/, ', $1')
} }
var linkText = (this.text || (alias == '_global_' && publish.conf.globalName
|| alias)) + (parameters || '');
// if there is no symbol by that name just return the name unaltered // if there is no symbol by that name just return the name unaltered
if (!linkTo) { if (!linkTo) {
return this.text || alias + (parameters || ''); return linkText;
} else { } else {
// it's a symbol in another file // it's a symbol in another file
if (!linkTo.is("CONSTRUCTOR") && !linkTo.isNamespace) { // it's a method or property if (!linkTo.is("CONSTRUCTOR") && !linkTo.isNamespace) { // it's a method or property
linkPath= (Link.filemap) ? Link.filemap[linkTo.memberOf] : linkPath= (Link.filemap) ? Link.filemap[linkTo.memberOf] :
escape(linkTo.memberOf) || "global"; escape(linkTo.memberOf) || "_global_";
linkPath += publish.conf.ext + "#" + Link.symbolNameToLinkName(linkTo).toLowerCase(); linkPath += publish.conf.ext + "#" + Link.symbolNameToLinkName(linkTo).toLowerCase();
if (parameters) { if (parameters) {
linkPath += '-' + parameters.replace(/[()]+/g, '').split(', ').join('-').toLowerCase(); linkPath += '-' + parameters.replace(/[()]+/g, '').split(', ').join('-').toLowerCase();
@ -150,8 +154,6 @@ Link.prototype._makeSymbolLink = function(alias, parameters) {
} }
linkPath = linkBase + linkPath linkPath = linkBase + linkPath
} }
var linkText= (this.text || alias) + (parameters || '');
var link = { var link = {
linkPath: linkPath, linkPath: linkPath,
@ -172,7 +174,12 @@ Link.prototype._makeSymbolLink = function(alias, parameters) {
var linkName = link.linkPath.replace(/^[^#]+#/, ''); var linkName = link.linkPath.replace(/^[^#]+#/, '');
onClick = " onclick=\"return toggleMember('" + linkName + "', true);\""; onClick = " onclick=\"return toggleMember('" + linkName + "', true);\"";
} }
var html = "<a href=\""+link.linkPath+link.linkInner+"\""+target+onClick+"><tt>"+link.linkText+"</tt></a>"; var text = link.linkText;
// TODO: tt is gone in HTML5. Instead we should give these links and code
// elements a special class so they can be styled through CSS.
if (this.asCode)
text = "<tt>" + text + "</tt>";
var html = "<a href=\""+link.linkPath+link.linkInner+"\""+target+onClick+">" + text + "</a>";
if (this.prefix || this.suffix) if (this.prefix || this.suffix)
html = (this.prefix || '') + html + (this.suffix || ''); html = (this.prefix || '') + html + (this.suffix || '');
return html; return html;

View file

@ -1,5 +1,5 @@
var classLayout = { var classLayout = {
'Paper.js': ['Global Scope:_global_'], '_global_': ['Global Scope:_global_'],
'Basic Types': ['Point', 'Size', 'Rectangle', 'Matrix'], 'Basic Types': ['Point', 'Size', 'Rectangle', 'Matrix'],
'Items': ['Item', 'Layer', 'Group', 'Raster', 'PlacedSymbol'], 'Items': ['Item', 'Layer', 'Group', 'Raster', 'PlacedSymbol'],
'Paths': ['Path', 'CompoundPath', 'Segment', 'Curve', 'PathStyle', 'ruler', 'Paths': ['Path', 'CompoundPath', 'Segment', 'Curve', 'PathStyle', 'ruler',

View file

@ -6,25 +6,25 @@ load(JSDOC.opt.t + 'src/Render.js');
function publish(symbolSet) { function publish(symbolSet) {
var renderMode = JSDOC.opt.D.renderMode; var renderMode = JSDOC.opt.D.renderMode;
var templatedocs = renderMode == 'templatedocs'; var templates = renderMode == 'templates';
var extension = templatedocs ? '.jstl' : '.html'; var extension = templates ? '.jstl' : '.html';
var templateDir = JSDOC.opt.t || SYS.pwd + '../templates/jsdoc/'; var templateDir = JSDOC.opt.t || SYS.pwd + '../templates/jsdoc/';
var outDir = JSDOC.opt.d || SYS.pwd + '../out/jsdoc/'; var outDir = JSDOC.opt.d || SYS.pwd + '../out/jsdoc/';
publish.conf = { // trailing slash expected for dirs publish.conf = { // trailing slash expected for dirs
// Use no extensions in links for templatedocs // Use no extensions in links for templates
ext: templatedocs ? '' : extension, ext: templates ? '' : extension,
outDir: outDir, outDir: outDir,
templateDir: templateDir, templateDir: templateDir,
staticDir: templateDir + 'static/', staticDir: templateDir + 'static/',
classesDir: outDir + 'classes/', classesDir: outDir + 'classes/',
symbolsDir: templatedocs ? 'reference/' : 'classes/', symbolsDir: templates ? 'reference/' : 'classes/',
srcDir: 'symbols/src/', srcDir: 'symbols/src/',
renderMode: renderMode, renderMode: renderMode,
globalName: 'Global Scope' globalName: 'Global Scope'
}; };
Link.base = templatedocs ? '/' : '../'; Link.base = templates ? '/' : '../';
if (renderMode == 'docs') { if (renderMode == 'docs') {
// Copy over the static files // Copy over the static files
@ -32,13 +32,11 @@ function publish(symbolSet) {
new java.io.File(publish.conf.staticDir), new java.io.File(publish.conf.staticDir),
new java.io.File(publish.conf.outDir) new java.io.File(publish.conf.outDir)
); );
// Create the classes directory
new java.io.File(publish.conf.classesDir).mkdir();
} else { } else {
Utils.deleteFiles(new File(publish.conf.outDir)); Utils.deleteFiles(new File(publish.conf.outDir));
new java.io.File(publish.conf.classesDir).mkdirs();
} }
// Create the classes directory
new java.io.File(publish.conf.classesDir).mkdirs();
// used to allow Link to check the details of things being linked to // used to allow Link to check the details of things being linked to
Link.symbolSet = symbolSet; Link.symbolSet = symbolSet;
@ -50,24 +48,25 @@ function publish(symbolSet) {
classes = symbols.filter(Utils.isaClass).sort(aliasSort); classes = symbols.filter(Utils.isaClass).sort(aliasSort);
// create a filemap in which outfiles must be to be named uniquely, ignoring case // create a filemap in which outfiles must be to be named uniquely, ignoring case
// Since we want lowercase links in templatedocs, we always use this // Since we want lowercase links in templates, we always use this
if (JSDOC.opt.u || templatedocs) { var filemapCounts = {};
var filemapCounts = {}; Link.filemap = {};
Link.filemap = {}; for (var i = 0, l = classes.length; i < l; i++) {
for (var i = 0, l = classes.length; i < l; i++) { var alias = classes[i].alias,
var alias = classes[i].alias, lcAlias = alias.toLowerCase();
lcAlias = alias.toLowerCase();
if (!filemapCounts[lcAlias]) {
if (!filemapCounts[lcAlias]) { filemapCounts[lcAlias] = 1;
filemapCounts[lcAlias] = 1; } else {
} else { filemapCounts[lcAlias]++;
filemapCounts[lcAlias]++;
}
// Use lowercase links for templatedocs
var linkAlias = templatedocs ? lcAlias : alias;
Link.filemap[alias] = filemapCounts[lcAlias] > 1
? linkAlias + '_' + filemapCounts[lcAlias] : linkAlias;
} }
// Use lowercase links for templates
var linkAlias = templates ? lcAlias : alias;
// Rename _global_.html to global.html
if (linkAlias == '_global_')
linkAlias = 'global';
Link.filemap[alias] = filemapCounts[lcAlias] > 1
? linkAlias + '_' + filemapCounts[lcAlias] : linkAlias;
} }
// create each of the class pages // create each of the class pages
@ -81,10 +80,9 @@ function publish(symbolSet) {
method.isOperator = Operator.isOperator(method); method.isOperator = Operator.isOperator(method);
} }
Link.currentSymbol= symbol; Link.currentSymbol = symbol;
var html = Render._class(symbol); var html = Render._class(symbol);
var name = ((JSDOC.opt.u)? Link.filemap[symbol.alias] : symbol.alias) var name = Link.filemap[symbol.alias] + extension;
+ extension;
if (renderMode == 'docs') { if (renderMode == 'docs') {
html = Render.html({ html = Render.html({
content: html, content: html,
@ -93,8 +91,8 @@ function publish(symbolSet) {
} }
IO.saveFile(publish.conf.classesDir, name, html); IO.saveFile(publish.conf.classesDir, name, html);
} }
if (templatedocs) { if (templates) {
IO.saveFile(publish.conf.outDir, 'packages.js', Render.indexjs()); IO.saveFile(publish.conf.outDir, 'packages.js', Render.packages());
} else { } else {
IO.saveFile(publish.conf.classesDir, 'index.html', Render.index()); IO.saveFile(publish.conf.classesDir, 'index.html', Render.index());
} }

View file

@ -15,7 +15,7 @@ var Render = new function() {
constructor: 'constructor.tmpl', constructor: 'constructor.tmpl',
html: 'html.tmpl', html: 'html.tmpl',
index: 'index.tmpl', index: 'index.tmpl',
indexjs: 'indexjs.tmpl', packages: 'packages.tmpl',
operator: 'operator.tmpl' operator: 'operator.tmpl'
}; };
publish.classes = []; publish.classes = [];
@ -35,7 +35,7 @@ var Render = new function() {
// {@link ...} -> html links // {@link ...} -> html links
str = str.replace(/\{@link ([^} ]+) ?\}/gi, str = str.replace(/\{@link ([^} ]+) ?\}/gi,
function(match, symbolName) { function(match, symbolName) {
return new Link().toSymbol(symbolName.replace(/[\^]/g, '-')); return new Link(true).toSymbol(symbolName.replace(/[\^]/g, '-'));
} }
); );
// {@code ...} -> code blocks // {@code ...} -> code blocks
@ -142,7 +142,7 @@ var Render = new function() {
}; };
param.inheritedLinks = []; param.inheritedLinks = [];
for (var i in param.inheritedClasses) { for (var i in param.inheritedClasses) {
param.inheritedLinks.push('<b>' + new Link().toSymbol(i) + '</b>'); param.inheritedLinks.push('<b>' + new Link(true).toSymbol(i) + '</b>');
} }
param.inheritedLinks = param.inheritedLinks.join(', '); param.inheritedLinks = param.inheritedLinks.join(', ');
// Add the grouped operators to param: // Add the grouped operators to param:
@ -157,8 +157,8 @@ var Render = new function() {
param.operators[name].push(operator); param.operators[name].push(operator);
} }
} }
var name = param.name == '_global_' var name = param.name == '_global_' && publish.conf.globalName
? publish.conf.globalName : param.name; || param.name;
publish.curClass = { publish.curClass = {
name: name, name: name,
index: { index: {
@ -234,7 +234,7 @@ var Render = new function() {
name: symbol.name, name: symbol.name,
description: processInlineTags(symbol.desc, description: processInlineTags(symbol.desc,
{stripParagraphs: true}), {stripParagraphs: true}),
typeLink: new Link().toSymbol(symbol.type), typeLink: new Link(true).toSymbol(symbol.type),
symbol: symbol symbol: symbol
}); });
}, },
@ -271,7 +271,7 @@ var Render = new function() {
name: symbol.name, name: symbol.name,
description: processInlineTags(symbol.desc, description: processInlineTags(symbol.desc,
{stripParagraphs: true}), {stripParagraphs: true}),
typeLink: new Link().toSymbol(symbol.type), typeLink: new Link(true).toSymbol(symbol.type),
symbol: symbol symbol: symbol
}); });
}, },
@ -329,8 +329,10 @@ var Render = new function() {
return templates.html.process(content); return templates.html.process(content);
}, },
classes: function() { classes: function() {
// TODO: Use Template instead? // TODO: Use a template instead?
var renderMode = publish.conf.renderMode; var renderMode = publish.conf.renderMode;
var out = '<ul class="package-classes">';
load(JSDOC.opt.t + 'classLayout.js'); load(JSDOC.opt.t + 'classLayout.js');
function parseClassNames(classNames) { function parseClassNames(classNames) {
var out = ''; var out = '';
@ -347,6 +349,7 @@ var Render = new function() {
} }
return out; return out;
} }
function getLink(name) { function getLink(name) {
var link = name; var link = name;
if (name.indexOf(':') > 0) { if (name.indexOf(':') > 0) {
@ -354,13 +357,7 @@ var Render = new function() {
name = names[0]; name = names[0];
link = names[1]; link = names[1];
} }
if (renderMode == 'docs') { return '<li>' + new Link(false).toSymbol(link) + '</li>\n';
link += '.html';
} else if (renderMode == 'templatedocs') {
link = link.toLowerCase();
link = '/reference/' + (link == '_global_' ? 'global' : link);
}
return '<li><a href="' + link + '">' + name + '</a></li>\n';
} }
function getRuler() { function getRuler() {
@ -370,22 +367,28 @@ var Render = new function() {
function getHeading(title) { function getHeading(title) {
return '<li><h3>' + title + '</h3></li>\n'; return '<li><h3>' + title + '</h3></li>\n';
} }
var first = true,
out = '<ul class="package-classes">'; var first = true;
for (var i in classLayout) { for (var i in classLayout) {
out += '<li' + (first ? ' class="first">' : '>'); if (i != '_global_') {
out += '<h2>' + i + '</h2></li>\n'; out += '<li' + (first ? ' class="first">' : '>\n');
out += '<h2>' + i + '</h2>\n';
out += '<ul>\n';
}
out += parseClassNames(classLayout[i]); out += parseClassNames(classLayout[i]);
if (i != '_global_') {
out += '</ul>\n';
}
first = false; first = false;
} }
out += '</ul>';
return out; return out + '</ul>';
}, },
index: function(html) { index: function(html) {
return templates.index.process(html); return templates.index.process(html);
}, },
indexjs: function() { packages: function() {
return templates.indexjs.process(publish.classes); return templates.packages.process(publish.classes);
} }
}; };
}; };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 B

View file

@ -106,5 +106,5 @@ span.js-variable {
} }
span.js-variabledef, span.js-variabledef,
span.js-localvariable { span.js-localvariable {
color: #3a4a64 /*#687687;*/ color: #3a4a64;
} }

View file

@ -0,0 +1,53 @@
.paperscript .button {
display: none;
position: relative; /* position (top / right) relative to paperscriptcontainer */
float: right; /* align right as block */
font-size: 11px;
line-height: 16px;
padding: 2px 6px;
margin-bottom: -20px; /* move canvas up by 16px (height) + 2 * 2px (padding) */
top: 8px; /* margin to top */
right: 8px; /* margin to right */
background: #eee;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
z-index: 1;
}
.paperscript .source {
overflow: auto;
border: 1px solid #999;
}
.paperscript:hover .button {
display: block;
}
.paperscript .button:hover {
background: #ddd;
cursor: pointer;
}
.paperscript .CodeMirror {
margin-bottom: 0; /* Override any potential bottom margins again */
}
.paperscript .CodeMirror-gutter-text,
.paperscript .CodeMirror-lines {
padding-top: 10px;
padding-bottom: 10px;
}
.paperscript .canvas {
line-height: 0; /* prevent weird 5px padding under canvas elements */
}
.paperscript .canvas.border canvas {
border: 1px solid #999;
}
.paperscript.split .canvas {
border: 1px solid #999;
border-top: 0;
}

View file

@ -1,12 +1,12 @@
/* These styles are shared with the server version of docs */ /* These styles are shared with the server version of docs */
.reference h1, .reference h2, .reference h3 { .reference h1, .reference h2, .reference h3 {
font-size: 12px; font-size: 13px;
font-weight: normal; font-weight: normal;
display: block; height: 18px; /* -2px so border-bottom aligns with contained links */
height: 17px;
margin: 0 0 16px 0;
border-bottom: 1px solid; border-bottom: 1px solid;
margin-top: 0;
margin-bottom: 16px;
} }
.reference h3 { .reference h3 {
@ -14,13 +14,18 @@
border-bottom-style: dotted; border-bottom-style: dotted;
} }
.reference a tt {
line-height: 18px;
}
/*
.reference a tt, .reference a tt,
.reference a tt b { .reference a tt b {
padding-bottom: 1px; padding-bottom: 1px;
} }
*/
.reference pre { .reference p {
margin: 0 0 20px 0; margin: 0 0 16px 0;
} }
.reference ul { .reference ul {
@ -58,12 +63,8 @@
list-style-image: none; /* needed for ie 6 */ list-style-image: none; /* needed for ie 6 */
} }
.reference-end {
height: 600px;
}
.reference-members { .reference-members {
padding-bottom: 16px; margin-bottom: 16px;
} }
.member-group-text { .member-group-text {
@ -94,6 +95,18 @@
.member-text { .member-text {
border-top: 1px dashed #999; border-top: 1px dashed #999;
padding: 10px 10px 0 10px; padding: 10px 10px 0 10px;
margin-bottom: -6px; /* Compensate margins of p and ul to end up with 10px */
}
.reference ul,
.reference .paperscript,
.reference .CodeMirror {
margin-top: -8px; /* Move half way up close to previous paragraph */
margin-bottom: 16px;
}
.reference ul {
margin-top: 0; /* Clear the above -10px for ul again */
} }
.member-link { .member-link {
@ -106,20 +119,13 @@
padding-left: 30px; padding-left: 30px;
} }
.member-text ul { .package-classes {
padding-bottom: 10px;
}
ul.package-classes {
padding-bottom: 4px; padding-bottom: 4px;
} }
.package-classes li { .package-classes ul {
margin-left: 10px; margin-left: 10px;
} margin-bottom: 10px;
.package-classes li h2 {
margin-left: -10px;
} }
.reference h2 a { .reference h2 a {

View file

@ -12,7 +12,7 @@ body {
} }
select, input, textarea { select, input, textarea {
font-size: 12px; font-size: 11px;
margin: 0; margin: 0;
color: #000; color: #000;
} }
@ -44,7 +44,7 @@ p {
ul { ul {
padding: 0; padding: 0;
margin: 0 0 20px 16px; margin: 0 0 20px 16px;
list-style: disc outside url(../assets/bullet.gif); list-style: disc outside url(assets/bullet.gif);
} }
ol { ol {
@ -84,55 +84,3 @@ ol {
.footer { .footer {
margin-top: 20px; margin-top: 20px;
} }
/* PaperScript */
.paperscript {
margin-bottom: 20px;
}
.paperscript .button {
display: none;
position: relative; /* position (top / right) relative to paperscriptcontainer */
float: right; /* align right as block */
font-size: 11px;
line-height: 16px;
padding: 2px 6px;
margin-bottom: -20px; /* move canvas up by 16px (height) + 2 * 2px (padding) */
top: 8px; /* margin to top */
right: 8px; /* margin to right */
background: #eee;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
z-index: 1;
}
.paperscript .source {
overflow: auto;
border: 1px solid #999;
}
.paperscript:hover .button {
display: block;
}
.paperscript .button:hover {
background: #ddd;
cursor: pointer;
}
.paperscript .CodeMirror-gutter-text,
.paperscript .CodeMirror-lines {
padding-top: 10px;
padding-bottom: 10px;
}
.paperscript .canvas {
line-height: 0; /* prevent weird 5px padding under canvas elements */
}
.paperscript.split .canvas {
border: 1px solid #999;
border-top: 0;
}

File diff suppressed because one or more lines are too long

View file

@ -48,7 +48,6 @@ Code = HtmlElement.extend({
} }
}); });
PaperScript = HtmlElement.extend({ PaperScript = HtmlElement.extend({
_class: 'paperscript', _class: 'paperscript',
@ -176,45 +175,56 @@ PaperScript = HtmlElement.extend({
} }
}); });
$document.addEvent('domready', function() {
var h = unescape(document.location.hash);
if (h) scrollToElement(h.substring(1));
});
var lastMemberId = null; var lastMemberId = null;
function toggleMember(id, scrollTo) { function toggleMember(id, scrollTo, dontScroll) {
var link = $('#' + id + '-link');
if (!link)
return true;
var desc = $('#' + id + '-description');
var v = !link.hasClass('hidden');
// Retrieve y-offset before any changes, so we can correct scrolling after
var offset = (v ? link : desc).getOffset().y;
if (lastMemberId && lastMemberId != id) { if (lastMemberId && lastMemberId != id) {
var prevId = lastMemberId; var prevId = lastMemberId;
lastMemberId = null; lastMemberId = null;
toggleMember(prevId); toggleMember(prevId, false, true);
} }
var link = $('#' + id + '-link'); lastMemberId = v && id;
if (link) { link.modifyClass('hidden', v);
var desc = $('#' + id + '-description'); desc.modifyClass('hidden', !v);
var v = !link.hasClass('hidden'); if (!dontScroll) {
lastMemberId = v && id; // Correct scrolling relatively to where we are, by checking the amount
link.modifyClass('hidden', v); // the element has shifted due to the above toggleMember call, and
desc.modifyClass('hidden', !v); // correcting by 11px offset, caused by 1px border and 10px padding.
if (!desc.editor && v) { var scroll = $window.getScrollOffset();
desc.editor = $$('pre.code, .paperscript', desc).each(function(code) { $window.setScrollOffset(scroll.x, scroll.y
code.initialize(); + (v ? desc : link).getOffset().y - offset + 11 * (v ? 1 : -1));
});
}
if (scrollTo)
scrollToMember(id);
return false;
} }
return true; if (!desc.editor && v) {
desc.editor = $$('pre.code, .paperscript', desc).each(function(code) {
code.initialize();
});
}
if (scrollTo)
scrollToMember(id);
return false;
} }
function scrollToElement(id) { function scrollToElement(id) {
var e = $('#' + id + '-member'); var e = $('#' + id + '-member');
if (e) { if (e) {
var offs = e.getOffset();
$window.setScrollOffset(offs);
if (e.hasClass('member')) if (e.hasClass('member'))
toggleMember(id); toggleMember(id);
var offs = e.getOffset();
$window.setScrollOffset(offs);
} else { } else {
document.location.hash = id; window.location.hash = id;
} }
} }
$document.addEvent('domready', function() {
var h = unescape(document.location.hash);
if (h) scrollToElement(h.substring(1));
if (window.paper)
paper.load();
});

View file

@ -1,5 +1,5 @@
<div class="reference-class"> <div class="reference-class">
<if test="publish.conf.renderMode == 'docs'"><h1>{+ data.name == '_global_' ? publish.conf.globalName : data.name +}</h1></if> <if test="publish.conf.renderMode == 'docs'"><h1>{+ data.name == '_global_' && publish.conf.globalName || data.name +}</h1></if>
<if test="data.inheritedLinks"> <if test="data.inheritedLinks">
<p> Extends {+ data.inheritedLinks +}</p> <p> Extends {+ data.inheritedLinks +}</p>
</if> </if>
@ -49,7 +49,7 @@
<for each="inheritedClass" in="data.inheritedClasses"> <for each="inheritedClass" in="data.inheritedClasses">
<if test="inheritedClass.properties.length"> <if test="inheritedClass.properties.length">
<!-- =========================== inherited properties ====================== --> <!-- =========================== inherited properties ====================== -->
<div class="reference-members"><h2>Properties inherited from {+ new Link().toSymbol(inheritedClass.className) +}</h2> <div class="reference-members"><h2>Properties inherited from {+ new Link(true).toSymbol(inheritedClass.className) +}</h2>
<for each="member" in="inheritedClass.properties"> <for each="member" in="inheritedClass.properties">
{+ Render.property(member, true) +} {+ Render.property(member, true) +}
</for> </for>
@ -57,7 +57,7 @@
</if> </if>
<if test="inheritedClass.methods.length"> <if test="inheritedClass.methods.length">
<!-- =========================== inherited methods ========================= --> <!-- =========================== inherited methods ========================= -->
<div class="reference-members"><h2>Functions inherited from {+ new Link().toSymbol(inheritedClass.className) +}</h2> <div class="reference-members"><h2>Functions inherited from {+ new Link(true).toSymbol(inheritedClass.className) +}</h2>
<for each="member" in="inheritedClass.methods"> <for each="member" in="inheritedClass.methods">
{+ Render.method(member, true) +} {+ Render.method(member, true) +}
</for> </for>

View file

@ -1,4 +1,6 @@
<p>
<b>Example</b> <if test="data.description.length">{+ '&mdash; ' + data.description +}</if> <b>Example</b> <if test="data.description.length">{+ '&mdash; ' + data.description +}</if>
</p>
<if test="data.paperScript"> <if test="data.paperScript">
<div class="paperscript <if test="data.paperScript.mode">{+ data.paperScript.mode +}</if>"> <div class="paperscript <if test="data.paperScript.mode">{+ data.paperScript.mode +}</if>">
<if test="data.paperScript.source != 'false'"><div class="button">{+ data.paperScript.mode == 'source' ? 'Source' : 'Run' +}</div></if> <if test="data.paperScript.source != 'false'"><div class="button">{+ data.paperScript.mode == 'source' ? 'Source' : 'Run' +}</div></if>
@ -9,7 +11,5 @@
</div> </div>
</if> </if>
<if test="!data.paperScript"> <if test="!data.paperScript">
<div class='paperscript'>
<pre class="code">{+ data.code +}</pre> <pre class="code">{+ data.code +}</pre>
</div>
</if> </if>

View file

@ -5,6 +5,7 @@
<base target="classFrame"> <base target="classFrame">
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css"> <link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
<link rel="stylesheet" href="../resources/css/style.css" type="text/css"> <link rel="stylesheet" href="../resources/css/style.css" type="text/css">
<link rel="stylesheet" href="../resources/css/paperscript.css" type="text/css">
<link rel="stylesheet" href="../resources/css/codemirror.css" type="text/css"> <link rel="stylesheet" href="../resources/css/codemirror.css" type="text/css">
<script src="../resources/js/bootstrap.js" type="text/javascript"></script> <script src="../resources/js/bootstrap.js" type="text/javascript"></script>
<script src="../resources/js/paper.js" type="text/javascript"></script> <script src="../resources/js/paper.js" type="text/javascript"></script>

View file

@ -30,7 +30,7 @@
</if> </if>
<ul><b>Type:</b> <ul><b>Type:</b>
<li> <li>
{+new Link().toSymbol(data.symbol.type)+} {+new Link(true).toSymbol(data.symbol.type)+}
</li> </li>
</ul> </ul>
{+ Render.seeAlsos(data.symbol) +} {+ Render.seeAlsos(data.symbol) +}

View file

@ -1,5 +1,5 @@
<if test="data.see.length"> <if test="data.see.length">
<p><b>See also:</b> <p><b>See also:</b>
<for each="item" in="data.see"><if test="$item_i > 0">, </if><tt>{+ new Link().toSymbol(item) +}</tt></for> <for each="item" in="data.see"><if test="$item_i > 0">, </if><tt>{+ new Link(true).toSymbol(item) +}</tt></for>
</p> </p>
</if> </if>

View file

@ -101,7 +101,7 @@ var Raster = this.Raster = Item.extend({
}, },
/** /**
* Pixels per inch of the raster at it's current size. * Pixels per inch of the raster at its current size.
* *
* @type Size * @type Size
* @bean * @bean