diff --git a/package.json b/package.json index b439bca..619d2d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CacheUMLExplorer", - "version": "0.11.0", + "version": "0.11.1", "description": "An UML Class explorer for InterSystems Caché", "directories": { "test": "test" diff --git a/web/js/ClassView.js b/web/js/ClassView.js index 0fe49fa..275c21c 100644 --- a/web/js/ClassView.js +++ b/web/js/ClassView.js @@ -359,7 +359,9 @@ ClassView.prototype.render = function (data) { var self = this, number = lib.countProperties(data["classes"]); - if (number < 30) return this.confirmRender(data); + if (number < 30) { + return self.confirmRender(data); + } var c = document.createElement("div"), c1 = document.createElement("h3"), @@ -415,6 +417,11 @@ ClassView.prototype.confirmRender = function (data) { uml = joint.shapes.uml, relFrom, relTo, classes = {}, connector; + // Reset view and zoom again because it may cause visual damage to icons. + // Don't ask me why. Just believe we need this peace of code. + this.zoom(null); + this.resetView(); + if (!data["classes"]) { console.error("Wrong data: no 'classes' property.", data); return;