mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
jsdoc: when linking to a member of the same class, toggle it.
This commit is contained in:
parent
1bbf5e27bf
commit
044dd34e9f
1 changed files with 7 additions and 2 deletions
|
@ -164,8 +164,13 @@ Link.prototype._makeSymbolLink = function(alias, parameters) {
|
|||
link.linkText = link.linkText.charAt(0).toLowerCase() + link.linkText.slice(1);
|
||||
link.linkText = link.linkText.replace(/#/g, '.');
|
||||
}
|
||||
|
||||
return "<a href=\""+link.linkPath+link.linkInner+"\""+target+">"+link.linkText+"</a>";
|
||||
var onClick = '';
|
||||
// If linking to a member of the same class, we also need to toggle it:
|
||||
if (alias.charAt(0) == '#') {
|
||||
var linkName = link.linkPath.replace(/^[^#]+#/, '');
|
||||
onClick = " onclick=\"return toggleMember('" + linkName + "', true);\"";
|
||||
}
|
||||
return "<a href=\""+link.linkPath+link.linkInner+"\""+target+onClick+">"+link.linkText+"</a>";
|
||||
}
|
||||
|
||||
/** Create a link to a source file. */
|
||||
|
|
Loading…
Reference in a new issue