binary tree drawing by javascript canvas