do not show the default values for enums (#689)

This commit is contained in:
Jeff Williams 2014-07-01 16:34:07 -07:00
parent 8c66aef685
commit 6e940d275b
2 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,7 @@ if (data.defaultvalue && (data.defaultvaluetype === 'object' || data.defaultvalu
<h5 class="subsection-title">Properties:</h5>
<dl><?js= this.partial('properties.tmpl', properties) ?></dl>
<dl><?js= this.partial('properties.tmpl', data) ?></dl>
<?js } ?>

View File

@ -1,5 +1,6 @@
<?js
var props = obj;
var data = obj;
var props = data.subprops || data.properties;
/* sort subprops under their parent props (like opts.classname) */
var parentProp = null;
@ -32,7 +33,7 @@
props.hasName = true;
}
if (typeof prop.defaultvalue !== 'undefined') {
if (typeof prop.defaultvalue !== 'undefined' && !data.isEnum) {
props.hasDefault = true;
}
});