New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[State tree] large app #9
Comments
What? it looks fine to me. ;) |
The middle-click idea seems like pretty low-hanging fruit. I don't have time to enhance this now, but would be happy to help guide anyone interested in implementing this. |
One other thing to note: you can increase the size of the viewport by passing var vis = window['ui-router-visualizer']
vis.StateVisualizer.create(ng1UIRouter, undefined, { width: 500, height: 500 });
vis.TransitionVisualizer.create(ng1UIRouter); |
thank you for the hint, I'll try to work on it next week! |
Awesome tool, very cool! Was wandering how the labels are rendering? If we wanted to send them through a custom parser to add some addition info etc. What code actually renders the labels? |
Here is where the state name is written out (as SVG text): https://github.com/ui-router/visualizer/blob/master/src/state/stateNode.tsx#L33-L40 Just below it is the "label text" (i.e., "active") The node itself is the |
Thanks so much 👍 Was exactly what i was looking for! |
…t strategies: Tree, Cluster, Radial Closes #9
…les: 1) A state can be collapsed only if it has at least one child 2) A state will automatically uncollapse if the state is entered 3) The count of (hidden) descendents is printed inside the collapsed state's circle Closes #9
@aitboudad version 3.0.0 released, please provide feedback |
@christopherthielen just checked on my side and it looks really nice, I have two remarks:
Thanks in advance! |
@aitboudad just before registering the plugin you can set the initial collapsed status of each state. For example: let states: State[] = router.stateRegistry.get().map(s => s.$$state());
let secondLevel = states.filter(s => s.parent.name === 'app');
secondLevel.forEach(s => s._collapsed = true);
router.plugin(Visualizer); Or in this plunker, collapse all top and second level states: // Auto-collapse children in state visualizer
var registry = $uiRouter.stateRegistry;
$uiRouter.stateRegistry.get().map(s => s.$$state())
.filter(s => s.path.length === 2 || s.path.length === 3)
.forEach(s => s._collapsed = true); |
Possible enhancements:
The text was updated successfully, but these errors were encountered: