treebeard icon indicating copy to clipboard operation
treebeard copied to clipboard

Treebeard constructor is unintuitive

Open sloria opened this issue 9 years ago • 2 comments

The Treebeard constructor/intializer function, runTB is a bit unintuitive because it doesn't really return a new Treebeard instance; intstead, it returns a mithril module: https://github.com/caneruguz/treebeard/blob/93ff6df2f4e230db33736eb1850de4e471daa5db/scripts/grid.js#L2406

This leads to a number of "gotchas":

var treebeard = new Treebeard({...});
console.log(treebeard.options);  // ERROR

sloria avatar Apr 10 '15 17:04 sloria

Can you add tests to this feature? We normally would require tests to be implemented for every new feature.

jeffreyliu3230 avatar Apr 12 '16 16:04 jeffreyliu3230