r113298 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113297‎ | r113298 | r113299 >
Date:21:14, 7 March 2012
Author:nad
Status:deferred
Tags:
Comment:
radius not working - made it proportional to number of child nodes
Modified paths:
  • /trunk/extensions/TreeAndMenu/star.js (modified) (history)

Diff [purge]

Index: trunk/extensions/TreeAndMenu/star.js
@@ -144,13 +144,11 @@
145145 }
146146 }
147147
148 - // Current radius for this elements children
149 - var r = window.star_config.radii;
150 - r = d > r.length ? r[r.length-1] : r[d-1];
151 - r = r * t;
152 -
153148 // Position the children to their locations around the parent
154 - var k = Math.PI * 2 / data.children.length;
 149+ var n = data.children.length;
 150+ var k = Math.PI * 2 / n;
 151+ var r = t * n * 8;
 152+ if( r < 20 ) r = 20;
155153 for( var i in data.children ) {
156154 var child = data.children[i];
157155 var cdata = getData(child);

Status & tagging log