-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
instance member in menu #112
Comments
Hello |
Thanks for your prompt and helpful comment, yes i must define the scope, which i expect to have done with the @memberof tag, for instance : Best regards. |
Hmm, that is true
|
Oh yes as static members it works, i also confirm. The caveat id for an instance member. Nevertheless thanks a lot i will further investigate … Best regards_._ |
you can try this:
|
Dear,
Oh thank you very much this is very kind, I'll do that
Huge thanks.
…--
Thierry Viéville
http://www-sop.inria.fr/members/Thierry.Vieville
Tel: +(33)613286459
De: "闪刀浪子" ***@***.***>
À: "clenemt/docdash" ***@***.***>
Cc: "Thierry Vieville" ***@***.***>, "Author"
***@***.***>
Envoyé: Mardi 10 Janvier 2023 13:21:10
Objet: Re: [clenemt/docdash] instance member in menu (Issue #112)
you can try this:
1.set docdash in your jsdoc.json
"docdash": {
"search": true,
"collapse": false,
"sort":false,
"static":true
}
1. open the node_modules/docdash/publish.js, find the line No.362, and change
the code。
if (docdash.static && members.find(function (m) { return (m.scope ===
'static'||m.scope==='instance'); } )) {
itemsNav += "<ul class='members'>";
itemsNav+="<span style='font-weight:bold;font-size:12px'>└ Members</span>"
members.forEach(function (member) {
// if (!member.scope === 'static') return;
itemsNav += "<li data-type='member'";
if(docdash.collapse)
itemsNav += " style='display: none;'";
itemsNav += ">";
if(member.scope==='static'){
itemsNav += linkto(member.longname, '[static] '+member.name);
}else{
itemsNav += linkto(member.longname, member.name);
}
itemsNav += "</li>";
});
itemsNav += "</ul>";
}
if (methods.length) {
itemsNav += "<ul class='methods'>";
itemsNav+="<span style='font-weight:bold;font-size:12px'>└ Methods</span>"
methods.forEach(function (method) {
if (docdash.static === false && method.scope === 'static') return;
if (docdash.private === false && method.access === 'private') return;
var navItem = '';
var navItemLink
if(method.scope==='static'){
navItemLink=linkto(method.longname, '[static] '+method.name);
}else{
navItemLink=linkto(method.longname, method.name);
}
navItem += "<li data-type='method'";
if(docdash.collapse)
navItem += " style='display: none;'";
navItem += ">";
navItem += navItemLink;
navItem += "</li>";
itemsNav += navItem;
});
itemsNav += "</ul>";
}
[
https://user-images.githubusercontent.com/16486126/211549777-874db128-a0cd-4a36-aae3-052a6f386604.png
]
[
https://user-images.githubusercontent.com/16486126/211549814-97a5d096-7ad1-4552-9307-8653fabfb235.png
]
—
Reply to this email directly, [
#112 (comment) | view it
on GitHub ] , or [
https://github.com/notifications/unsubscribe-auth/AAOVM2YALDHEIOEWHB6YP6LWRVH3NANCNFSM6AAAAAASKQF4FI
| unsubscribe ] .
You are receiving this because you authored the thread. Message ID:
***@***.***>
|
Dear dacdosh developers,
This is beautiful tool, thank you !
My question: when i document an instance member, e.g.,
/**
* @member {double} tau
* @memberof Belief
* @instance
* @description The degree of belief between -1 (false), 0 (unknown) and true (1), 0 by default.
*/
it does appear in the doc page but not in the menu, whereas a static (i.e., replacing @instance by @static) make it appears in the menu with a # prefix (which is fine). Is there something i miss ?
Best regards.
The text was updated successfully, but these errors were encountered: