@@ -79,7 +79,7 @@ ClassView.prototype.openClassDoc = function (className, nameSpace) {
7979 */
8080ClassView . prototype . createClassInstance = function ( name , classMetaData ) {
8181
82- var attrArr , methArr ,
82+ var attrArr , methArr , nameArr ,
8383 classParams = classMetaData [ "parameters" ] ,
8484 classProps = classMetaData [ "properties" ] ,
8585 classMethods = classMetaData [ "methods" ] ,
@@ -92,7 +92,7 @@ ClassView.prototype.createClassInstance = function (name, classMetaData) {
9292 } ;
9393
9494 return new joint . shapes . uml . Class ( {
95- name : name + "\x1b" + JSON . stringify ( { url : function ( ) { alert ( name ) } } ) ,
95+ name : nameArr = ( classMetaData [ "ABSTRACT" ] ? [ "<<Abstract>>" , name ] : [ name ] ) ,
9696 attributes : attrArr = ( function ( params , ps ) {
9797 var arr = [ ] , n ;
9898 for ( n in params ) {
@@ -129,7 +129,8 @@ ClassView.prototype.createClassInstance = function (name, classMetaData) {
129129 } ,
130130 size : {
131131 width : 300 ,
132- height : Math . max ( attrArr . length * 12.1 , 15 ) + Math . max ( methArr . length * 12.1 , 15 ) + 40
132+ height : Math . max ( nameArr . length * 12.1 , 0 ) + Math . max ( attrArr . length * 12.1 , 0 )
133+ + Math . max ( methArr . length * 12.1 , 0 ) + 30
133134 }
134135 } ) ;
135136
0 commit comments