From: Tim Bunce Date: Thu, 27 Sep 2012 15:27:24 +0000 (+0900) Subject: Hack to enable log scale for treemap nodes (disabled) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ad9e15604c0c5aa51e4bb837fc1a90acbdd43d0;p=p5sagit%2FDevel-Size.git Hack to enable log scale for treemap nodes (disabled) --- diff --git a/static/public/jit.js b/static/public/jit.js index 9bf6e9e..45204c2 100644 --- a/static/public/jit.js +++ b/static/public/jit.js @@ -4189,16 +4189,22 @@ var Accessors; } var dollar = prefix + prop; + var val; if(force) { - return data[dollar]; + val = data[dollar]; } - - if(!this.Config.overridable) - return prefixConfig[prop] || 0; - - return (dollar in data) ? - data[dollar] : ((dollar in this.data) ? this.data[dollar] : (prefixConfig[prop] || 0)); + else if(!this.Config.overridable) { + val = prefixConfig[prop] || 0; + } + else { + val = (dollar in data) ? + data[dollar] : ((dollar in this.data) ? this.data[dollar] : (prefixConfig[prop] || 0)); + } + if (dollar == 'XXX$area') { + val = Math.log(val); + } + return val; } var setDataInternal = function(prefix, prop, value, type) { @@ -17160,4 +17166,4 @@ $jit.Hypertree.$extend = true; - })(); \ No newline at end of file + })();