diff -r 4f92e61f87ba -r 0628ed75e8d3 client/js/renderer/noderepr.js --- a/client/js/renderer/noderepr.js Thu Sep 11 16:49:45 2014 +0200 +++ b/client/js/renderer/noderepr.js Fri Sep 19 17:54:55 2014 +0200 @@ -56,12 +56,9 @@ } }, buildShape: function(){ - console.log("buildShape");//, this.model.get("shape_changed"), this.model.get("shape")); if(typeof this.model.get("shape_changed")!=="undefined" && this.model.get("shape_changed")===true){ this.model.set("shape_changed", false); - console.log("REMOVE IMG !!"); - this.img = "a"; - //delete this.renderer.image_cache[this.img]; + delete this.img; } if(this.circle){ this.circle.remove(); @@ -72,14 +69,8 @@ this.circle = this.shapeBuilder.getShape(); this.circle.__representation = this; this.last_circle_radius = 1; - /*if (this.node_image) { - console.log("this.node_image.remove();") - this.node_image.remove(); - delete this.node_image; - }*/ }, redraw: function(_dontRedrawEdges) { - //console.log("redraw"); if(typeof this.model.get("shape_changed")!=="undefined" && this.model.get("shape_changed")===true){ this.buildShape(); } @@ -159,11 +150,9 @@ var lastImage = this.img; this.img = this.model.get("image"); if (this.img && this.img !== lastImage) { - console.log("test 1 = " + lastImage + ", img = " + this.img); this.showImage(); } if (this.node_image && !this.img) { - console.log("tes 2 = "); this.node_image.remove(); delete this.node_image; } @@ -195,22 +184,16 @@ }, showImage: function() { - console.log("showImage " + this.img); var _image = null; if (typeof this.renderer.image_cache[this.img] === "undefined") { - console.log("showImage 1"); _image = new Image(); this.renderer.image_cache[this.img] = _image; _image.src = this.img; } else { - console.log("showImage 2"); _image = this.renderer.image_cache[this.img]; } - console.log("showImage 3"); if (_image.width) { - console.log("showImage 4"); if (this.node_image) { - console.log("showImage 5"); this.node_image.remove(); } this.renderer.node_layer.activate(); @@ -447,7 +430,6 @@ this.minimap_circle.remove(); } if (this.node_image) { - console.log("remove image 1"); this.node_image.remove(); } }