Skip to content

Commit efcaf8d

Browse files
centering class view
1 parent e87d1f1 commit efcaf8d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

web/js/ClassView.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ ClassView.prototype.render = function (data) {
131131

132132
this.updateSizes();
133133

134+
var bb = this.paper.getContentBBox(), q = this.paper;
135+
this.paper.setOrigin(
136+
q.options.width/2 - bb.width/2,
137+
q.options.height/2 - Math.min(q.options.height/2 - 100, bb.height/2)
138+
);
139+
134140
};
135141

136142
ClassView.prototype.loadClass = function (className) {
@@ -139,7 +145,7 @@ ClassView.prototype.loadClass = function (className) {
139145

140146
this.showLoader();
141147
this.cacheUMLExplorer.source.getClassView(className, function (err, data) {
142-
console.log(data);
148+
//console.log(data);
143149
self.removeLoader();
144150
if (err) {
145151
self.showLoader("Unable to get " + self.cacheUMLExplorer.classTree.SELECTED_CLASS_NAME);

0 commit comments

Comments
 (0)