function fOnCreateLabel(domElement, node) { domElement.innerHTML = node.name; //Call the "onclick" method from //the hypertree to move the hypertree //correspondingly. //This method takes the clicked node's id. domElement.onclick = function() { ht.onClick(node.id); }; } //Take the left style property and //substract half of the label actual width to //center the label. function fOnPlaceLabel(tag, node) { var width = tag.offsetWidth; var intX = parseInt(tag.style.left); intX -= width / 2; tag.style.left = intX + 'px'; }

menu | centrer