Basic tests asserted

This commit is contained in:
Gonzalo Bellver
2012-01-24 18:01:56 -03:00
parent 4dad2f1a04
commit 483b889d6a
3 changed files with 89 additions and 63 deletions

View File

@@ -193,11 +193,12 @@ mindplot.layout.RootedTreeSet = new Class({
rect.attr('fill', fillColor);
var rectPosition = {x: rect.attr("x") - canvas.width/2 + rect.attr("width")/2, y:rect.attr("y") - canvas.height/2 + rect.attr("height")/2};
var rectSize = {width: rect.attr("width"), height:rect.attr("height")};
rect.click(function() {
console.log("[id:" + node.getId() + ", order:" + node.getOrder() + ", position:(" + rectPosition.x + "," + rectPosition.y + "), size:" + node.getSize().width + "x" + node.getSize().height + ", sorter:" + node.getSorter() +"]");
console.log("[id:" + node.getId() + ", order:" + node.getOrder() + ", position:(" + rectPosition.x + "," + rectPosition.y + "), size:" + rectSize.width + "x" + rectSize.height + ", sorter:" + node.getSorter() +"]");
});
text.click(function() {
console.log("[id:" + node.getId() + ", order:" + node.getOrder() + ", position:(" + rectPosition.x + "," + rectPosition.y + "), size:" + node.getSize().width + "x" + node.getSize().height + ", sorter:" + node.getSorter() +"]");
console.log("[id:" + node.getId() + ", order:" + node.getOrder() + ", position:(" + rectPosition.x + "," + rectPosition.y + "), size:" + rectSize.width + "x" + rectSize.height + ", sorter:" + node.getSorter() +"]");
});
for (var i = 0; i < children.length; i++) {