@@ -79,7 +79,7 @@ ClassView.prototype.openClassDoc = function (className, nameSpace) {
79
79
*/
80
80
ClassView . prototype . createClassInstance = function ( name , classMetaData ) {
81
81
82
- var attrArr , methArr ,
82
+ var attrArr , methArr , nameArr ,
83
83
classParams = classMetaData [ "parameters" ] ,
84
84
classProps = classMetaData [ "properties" ] ,
85
85
classMethods = classMetaData [ "methods" ] ,
@@ -92,7 +92,7 @@ ClassView.prototype.createClassInstance = function (name, classMetaData) {
92
92
} ;
93
93
94
94
return new joint . shapes . uml . Class ( {
95
- name : name + "\x1b" + JSON . stringify ( { url : function ( ) { alert ( name ) } } ) ,
95
+ name : nameArr = ( classMetaData [ "ABSTRACT" ] ? [ "<<Abstract>>" , name ] : [ name ] ) ,
96
96
attributes : attrArr = ( function ( params , ps ) {
97
97
var arr = [ ] , n ;
98
98
for ( n in params ) {
@@ -129,7 +129,8 @@ ClassView.prototype.createClassInstance = function (name, classMetaData) {
129
129
} ,
130
130
size : {
131
131
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
133
134
}
134
135
} ) ;
135
136
0 commit comments