From: Tim Bunce Date: Tue, 25 Sep 2012 02:56:38 +0000 (+0900) Subject: Note that the mouse-over doesn't work with Label:{}. Need to find out why. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c065a0c379b4f96412bc127572dcc57039b12b31;p=p5sagit%2FDevel-Size.git Note that the mouse-over doesn't work with Label:{}. Need to find out why. --- diff --git a/static/public/tm.js b/static/public/tm.js index 6119410..cfe8949 100644 --- a/static/public/tm.js +++ b/static/public/tm.js @@ -13,6 +13,7 @@ var labelType, useGradients, nativeTextSupport, animate; nativeTextSupport = labelType == 'Native'; useGradients = nativeCanvasSupport; animate = !(iStuff || !nativeCanvasSupport); + console.log({ "labelType":labelType, "useGradients":useGradients, "nativeTextSupport":nativeTextSupport }); })(); var Log = { @@ -46,7 +47,7 @@ function bySortedValue(obj, comparitor, callback, context) { function request_jit_tree(nodeId, level, depth, onComplete){ - var params = { logarea: 1 }; + var params = { logarea: 0 }; jQuery.getJSON('jit_tree/'+nodeId+'/'+depth, params, onComplete); } @@ -60,7 +61,7 @@ function init(){ //show only one tree level levelsToShow: levelsToShow, //parent box title heights - titleHeight: 11, + titleHeight: 12, //enable animations animate: animate, //box offsets @@ -175,6 +176,18 @@ function init(){ //This method is called once, on label creation and only for DOM labels. onCreateLabel: function(domElement, node){ domElement.innerHTML = node.name; + + // this doesn't work with Label:{} above + var style = domElement.style; + style.display = ''; + style.border = '1px solid transparent'; + domElement.onmouseover = function() { + style.border = '1px solid #9FD4FF'; + }; + domElement.onmouseout = function() { + style.border = '1px solid transparent'; + }; + } });