injecting treeEnv into canvas directive