mar10/fancytree

View on GitHub
bin/jsdoc3-moogle/tmpl/method.tmpl

Summary

Maintainability
Test Coverage
<?js
var data = obj;
var self = this;
?>
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
    <?js if (data.kind === 'class' && data.classdesc) { ?>
    <h2>Constructor</h2>
    <?js } ?>

    <?js if (data.kind !== 'namespace') { ?>
    <h4 class="name" id="<?js= id ?>">
        <!-- Start MOOGLE Changes -->
        <?js= data.attribs + (kind === 'class' ? 'new ' : '') + name + (data.signature || '') ?>

        <a class="showHover" href="#<?js= id ?>">
            <svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
                <path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
                </path>
            </svg>
        </a>
        <!-- End MOOGLE Changes -->
    </h4>
    <?js } ?>

    <?js if (data.summary) { ?>
    <p class="summary"><?js= summary ?></p>
    <?js } ?>
<?js } ?>

<?js if (data.kind !== 'module' && data.description && !data.hideconstructor) { ?>
<div class="description">
    <?js= data.description ?>
</div>
<?js } ?>

<?js if (data.augments && data.alias && data.alias.indexOf('module:') === 0) { ?>
    <h5>Extends:</h5>
    <?js= self.partial('augments.tmpl', data) ?>
<?js } ?>

<?js if (kind === 'event' && data.type && data.type.names) {?>
    <h5>Type:</h5>
    <ul>
        <li>
            <?js= self.partial('type.tmpl', data.type.names) ?>
        </li>
    </ul>
<?js } ?>

<?js if (data['this']) { ?>
    <h5>This:</h5>
    <ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
<?js } ?>

<?js if (data.params && params.length && !data.hideconstructor) { ?>
    <h5>Parameters:</h5>
    <?js= this.partial('params.tmpl', params) ?>
<?js } ?>

<?js= this.partial('details.tmpl', data) ?>

<?js if (data.kind !== 'module' && data.requires && data.requires.length) { ?>
<h5>Requires:</h5>
<ul><?js data.requires.forEach(function(r) { ?>
    <li><?js= self.linkto(r) ?></li>
<?js }); ?></ul>
<?js } ?>

<?js if (data.fires && fires.length) { ?>
<h5>Fires:</h5>
<ul><?js fires.forEach(function(f) { ?>
    <li><?js= self.linkto(f) ?></li>
<?js }); ?></ul>
<?js } ?>

<?js if (data.listens && listens.length) { ?>
<h5>Listens to Events:</h5>
<ul><?js listens.forEach(function(f) { ?>
    <li><?js= self.linkto(f) ?></li>
<?js }); ?></ul>
<?js } ?>

<?js if (data.listeners && listeners.length) { ?>
<h5>Listeners of This Event:</h5>
<ul><?js listeners.forEach(function(f) { ?>
    <li><?js= self.linkto(f) ?></li>
<?js }); ?></ul>
<?js } ?>

<?js if (data.exceptions && exceptions.length) { ?>
<h5>Throws:</h5>
<?js if (exceptions.length > 1) { ?><ul><?js
    exceptions.forEach(function(r) { ?>
        <li><?js= self.partial('exceptions.tmpl', r) ?></li>
    <?js });
?></ul><?js } else {
    exceptions.forEach(function(r) { ?>
        <?js= self.partial('exceptions.tmpl', r) ?>
    <?js });
} } ?>

<?js if (data.returns && returns.length) { ?>
<h5>Returns:</h5>
<?js if (returns.length > 1) { ?><ul><?js
    returns.forEach(function(r) { ?>
        <li><?js= self.partial('returns.tmpl', r) ?></li>
    <?js });
?></ul><?js } else {
    returns.forEach(function(r) { ?>
        <?js= self.partial('returns.tmpl', r) ?>
    <?js });
} } ?>

<?js if (data.yields && yields.length) { ?>
<h5>Yields:</h5>
<?js if (yields.length > 1) { ?><ul><?js
    yields.forEach(function(r) { ?>
        <li><?js= self.partial('returns.tmpl', r) ?></li>
    <?js });
?></ul><?js } else {
    yields.forEach(function(r) { ?>
        <?js= self.partial('returns.tmpl', r) ?>
    <?js });
} } ?>

<?js if (data.examples && examples.length) { ?>
    <h5>Example<?js= examples.length > 1? 's':'' ?></h5>
    <?js= this.partial('examples.tmpl', examples) ?>
<?js } ?>