client/annotviz/app/js/annotsroll.js
changeset 120 89544c28a364
parent 117 c0034b35c44e
child 122 3b11017a76a4
--- a/client/annotviz/app/js/annotsroll.js	Thu Jan 22 11:18:58 2015 +0100
+++ b/client/annotviz/app/js/annotsroll.js	Thu Jan 22 15:02:54 2015 +0100
@@ -47,9 +47,10 @@
 
     var yInit = opts.yInit;
     var annotStyles = _(opts.annotStyles).defaults(defaultAnnotStyles).value();
+    var marginX = 15;
     for(var style in annotStyles) {
     	if (annotStyles[style].wordWrap === true){
-    		annotStyles[style].wordWrapWidth = this.widthRoll; 
+    		annotStyles[style].wordWrapWidth = this.widthRoll - marginX; 
     	}
     }
     var started = false;
@@ -85,15 +86,12 @@
     this.getColor = function(ts, code) {
         var colorsDef;
         _(this.annotColors).eachRight(function(cdef) {
-            console.log("cDef", cdef);
-            console.log("cDef ts", cdef.ts, ts);
             if(cdef.ts < ts) {
                 colorsDef = cdef.colors;
                 return false;
             }
         });
         var resColor;
-        console.log("colorsDef", colorsDef);
         if(colorsDef) {
             resColor = colorsDef[code];
         }
@@ -124,21 +122,21 @@
 	            category,
 	            _(annotStyles.label).extend({fill: color}).value()
 	        );
-	        catLabel.x = x + 20;
+	        catLabel.x = x + marginX;
 	        catLabel.y = y - 23;
 	        this.container.addChild(catLabel);
 	        textHeight += (catLabel.height - 23 + 2);
 	
 	        if(text) {
 	            var catText = new PIXI.Text(text, annotStyles.text);
-	            catText.x = x + 20;
+	            catText.x = x + marginX;
 	            catText.y = y + textHeight;
 	            this.container.addChild(catText);
 	            textHeight += (catText.height + 2);
 	        }
 	
 	        var catUser = new PIXI.Text(user, annotStyles.user);
-	        catUser.x = x + 20;
+	        catUser.x = x + marginX;
 	        catUser.y = y + textHeight;
 	        this.container.addChild(catUser);
 	        textHeight += (catUser.height + 8);