mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-07 02:04:04 -04:00
Cleanup the jsdoc template a bit.
This commit is contained in:
parent
e1cfadf9a3
commit
d03e6b22dd
1 changed files with 16 additions and 133 deletions
|
@ -63,66 +63,9 @@
|
||||||
{+resolveLinks(data.classDesc)+}
|
{+resolveLinks(data.classDesc)+}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
<!-- ============================== inherited properties summary ===================== -->
|
||||||
<if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))">
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class {+data.alias+}.">
|
|
||||||
<caption>Constructor</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes">{!
|
|
||||||
if (data.isPrivate) output += "<private> ";
|
|
||||||
if (data.isInner) output += "<inner> ";
|
|
||||||
!} </td>
|
|
||||||
<td class="nameDescription" {!if (data.comment.getTag("hilited").length){output += 'style="color: red"'}!}>
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>{+ new Link().toSymbol(data.alias).inner('constructor')+}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if>
|
|
||||||
</div>
|
|
||||||
<div class="description">{+resolveLinks(summarize(data.desc))+}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
<if test="data.properties.length">
|
<if test="data.properties.length">
|
||||||
{! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}); !}
|
{! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}); !}
|
||||||
<if test="ownProperties.length">
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the properties documented in the class {+data.alias+}.">
|
|
||||||
<caption>Properties</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Field Attributes</th>
|
|
||||||
<th scope="col">Field Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<for each="member" in="ownProperties">
|
|
||||||
<tr>
|
|
||||||
<td class="attributes">{!
|
|
||||||
if (member.isPrivate) output += "<private> ";
|
|
||||||
if (member.isInner) output += "<inner> ";
|
|
||||||
if (member.isStatic) output += "<static> ";
|
|
||||||
if (member.isConstant) output += "<constant> ";
|
|
||||||
!} </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>
|
|
||||||
</div>
|
|
||||||
<div class="description">{+resolveLinks(summarize(member.desc))+}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</for>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="data.inheritsFrom.length">
|
<if test="data.inheritsFrom.length">
|
||||||
<dl class="inheritsList">
|
<dl class="inheritsList">
|
||||||
{!
|
{!
|
||||||
|
@ -151,36 +94,9 @@
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
<!-- ============================== inherited methods summary ======================== -->
|
||||||
<if test="data.methods.length">
|
<if test="data.methods.length">
|
||||||
{! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}); !}
|
{! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}); !}
|
||||||
<if test="ownMethods.length">
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class {+data.alias+}.">
|
|
||||||
<caption>Functions</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Function Attributes</th>
|
|
||||||
<th scope="col">Function Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<for each="member" in="ownMethods">
|
|
||||||
<tr>
|
|
||||||
<td class="attributes">{!
|
|
||||||
if (member.isPrivate) output += "<private> ";
|
|
||||||
if (member.isInner) output += "<inner> ";
|
|
||||||
if (member.isStatic) output += "<static> ";
|
|
||||||
!} </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name.replace(/\^\d+$/, ''))+}</b>{+makeSignature(member.params)+}
|
|
||||||
</div>
|
|
||||||
<div class="description">{+resolveLinks(summarize(member.desc))+}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</for>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="data.inheritsFrom.length">
|
<if test="data.inheritsFrom.length">
|
||||||
<dl class="inheritsList">
|
<dl class="inheritsList">
|
||||||
|
@ -209,36 +125,9 @@
|
||||||
</dl>
|
</dl>
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<!-- ============================== events summary ======================== -->
|
<!-- ============================== inherited events summary ======================== -->
|
||||||
<if test="data.events.length">
|
<if test="data.events.length">
|
||||||
{! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias && !$.isNamespace}); !}
|
{! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias && !$.isNamespace}); !}
|
||||||
<if test="ownEvents.length">
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the events documented in the class {+data.alias+}.">
|
|
||||||
<caption>Event Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Event Attributes</th>
|
|
||||||
<th scope="col">Event Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<for each="member" in="ownEvents">
|
|
||||||
<tr>
|
|
||||||
<td class="attributes">{!
|
|
||||||
if (member.isPrivate) output += "<private> ";
|
|
||||||
if (member.isInner) output += "<inner> ";
|
|
||||||
if (member.isStatic) output += "<static> ";
|
|
||||||
!} </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>{+makeSignature(member.params)+}
|
|
||||||
</div>
|
|
||||||
<div class="description">{+resolveLinks(summarize(member.desc))+}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</for>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="data.inheritsFrom.length">
|
<if test="data.inheritsFrom.length">
|
||||||
<dl class="inheritsList">
|
<dl class="inheritsList">
|
||||||
|
@ -272,7 +161,7 @@
|
||||||
<if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))">
|
<if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))">
|
||||||
<div class="details"><a name="constructor"> </a>
|
<div class="details"><a name="constructor"> </a>
|
||||||
<div class="sectionTitle">
|
<div class="sectionTitle">
|
||||||
Constructor Detail
|
Constructor
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fixedFont">{!
|
<div class="fixedFont">{!
|
||||||
|
@ -299,7 +188,7 @@
|
||||||
<dt class="heading">Parameters:</dt>
|
<dt class="heading">Parameters:</dt>
|
||||||
<for each="item" in="data.params">
|
<for each="item" in="data.params">
|
||||||
<dt>
|
<dt>
|
||||||
{+((item.type)?""+("<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type)+"}</span> ")) : "")+} <b>{+item.name+}</b>
|
<b>{+item.name+}</b> {+((item.type)?""+("<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type)+"}</span> ")) : "")+}
|
||||||
<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
|
<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>{+resolveLinks(item.desc)+}</dd>
|
<dd>{+resolveLinks(item.desc)+}</dd>
|
||||||
|
@ -362,19 +251,19 @@
|
||||||
<!-- ============================== field details ========================== -->
|
<!-- ============================== field details ========================== -->
|
||||||
<if test="defined(ownProperties) && ownProperties.length">
|
<if test="defined(ownProperties) && ownProperties.length">
|
||||||
<div class="sectionTitle">
|
<div class="sectionTitle">
|
||||||
Properties Detail
|
Properties
|
||||||
</div>
|
</div>
|
||||||
<for each="member" in="ownProperties">
|
<for each="member" in="ownProperties">
|
||||||
<a name="{+Link.symbolNameToLinkName(member)+}"> </a>
|
<a name="{+Link.symbolNameToLinkName(member)+}"> </a>
|
||||||
<div class="fixedFont">{!
|
<div class="fixedFont">{!
|
||||||
if (member.isPrivate) output += "<private> ";
|
if (member.isPrivate) output += "<private> ";
|
||||||
if (member.isInner) output += "<inner> ";
|
if (member.isInner) output += "<inner> ";
|
||||||
if (member.isStatic) output += "<static> ";
|
// if (member.isStatic) output += "<static> ";
|
||||||
if (member.isConstant) output += "<constant> ";
|
if (member.isConstant) output += "<constant> ";
|
||||||
!}
|
!}
|
||||||
|
|
||||||
<if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
|
|
||||||
<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>
|
<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>
|
||||||
|
<if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
|
@ -430,26 +319,20 @@
|
||||||
<!-- ============================== method details ========================= -->
|
<!-- ============================== method details ========================= -->
|
||||||
<if test="defined(ownMethods) && ownMethods.length">
|
<if test="defined(ownMethods) && ownMethods.length">
|
||||||
<div class="sectionTitle">
|
<div class="sectionTitle">
|
||||||
Method Detail
|
Functions
|
||||||
</div>
|
</div>
|
||||||
<for each="member" in="ownMethods">
|
<for each="member" in="ownMethods">
|
||||||
<a name="{+Link.symbolNameToLinkName(member)+}"> </a>
|
<a name="{+Link.symbolNameToLinkName(member)+}"> </a>
|
||||||
<div class="fixedFont">{!
|
<div class="fixedFont">
|
||||||
|
{!
|
||||||
if (member.isPrivate) output += "<private> ";
|
if (member.isPrivate) output += "<private> ";
|
||||||
if (member.isInner) output += "<inner> ";
|
if (member.isInner) output += "<inner> ";
|
||||||
if (member.isStatic) output += "<static> ";
|
// if (member.isStatic) output += "<static> ";
|
||||||
!}
|
!}
|
||||||
|
|
||||||
<if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
|
|
||||||
<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name.replace(/\^\d+$/, '')+}</b>{+makeSignature(member.params)+}
|
<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name.replace(/\^\d+$/, '')+}</b>{+makeSignature(member.params)+}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{+resolveLinks(member.desc)+}
|
{+resolveLinks(member.desc)+}
|
||||||
<if test="member.srcFile != data.srcFile">
|
|
||||||
<br />
|
|
||||||
<i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
|
|
||||||
</if>
|
|
||||||
<if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
|
<if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -464,7 +347,7 @@
|
||||||
<dt class="heading">Parameters:</dt>
|
<dt class="heading">Parameters:</dt>
|
||||||
<for each="item" in="member.params">
|
<for each="item" in="member.params">
|
||||||
<dt>
|
<dt>
|
||||||
{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b>
|
<b>{+item.name+}</b>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}
|
||||||
<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
|
<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>{+resolveLinks(item.desc)+}</dd>
|
<dd>{+resolveLinks(item.desc)+}</dd>
|
||||||
|
@ -536,7 +419,7 @@
|
||||||
<div class="fixedFont">{!
|
<div class="fixedFont">{!
|
||||||
if (member.isPrivate) output += "<private> ";
|
if (member.isPrivate) output += "<private> ";
|
||||||
if (member.isInner) output += "<inner> ";
|
if (member.isInner) output += "<inner> ";
|
||||||
if (member.isStatic) output += "<static> ";
|
// if (member.isStatic) output += "<static> ";
|
||||||
!}
|
!}
|
||||||
|
|
||||||
<if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
|
<if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
|
||||||
|
@ -563,7 +446,7 @@
|
||||||
<dt class="heading">Parameters:</dt>
|
<dt class="heading">Parameters:</dt>
|
||||||
<for each="item" in="member.params">
|
<for each="item" in="member.params">
|
||||||
<dt>
|
<dt>
|
||||||
{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b>
|
<b>{+item.name+}</b>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}
|
||||||
<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
|
<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>{+ resolveLinks(item.desc) +}</dd>
|
<dd>{+ resolveLinks(item.desc) +}</dd>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue