philogb / jit

The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web
http://thejit.org
Other
1.51k stars 297 forks source link

Spacetree: Make treeFitsInCanvas check optional #40

Closed beaugunderson closed 13 years ago

beaugunderson commented 14 years ago

In getRightLevelToShow a check is done to make sure the resulting tree fits in the canvas; if it does not the level is decreased until the resulting tree does fit.

I think this check should be optional--I should be able to control the number of levels displayed regardless of if they fit in the canvas (because the user is free to drag/zoom around).

pmario commented 14 years ago

would be nice for forceDirected too.

philogb commented 13 years ago

That currently exists in the Spacetree. Try adding:

{
   levelsToShow: n,
   constrained: false
}

where n is a number.