patrickmcelwee / ml-visjs-graph-ng

graph visualization for triples stored in MarkLogic, based on the VisJS Network library
Other
4 stars 2 forks source link

does not work inside uib-tab #8

Open patrickmcelwee opened 8 years ago

patrickmcelwee commented 8 years ago

For some reason, this directive does not play well inside a <uib-tab> directive. It seems that other directives have similar problems. For a workaround, you can use the bootstrap markup for tabs instead.

grtjn commented 7 years ago

uib-accordion works though..

grtjn commented 7 years ago

It would be good to find out why though. Wondering if it is a JS or a CSS issue. In case of the latter, that should be solvable..

grtjn commented 6 years ago

uib-accordion works (more or less), but only when it is in a accordion div that is not closed initially. Need to investigate why, and figure out a way to refresh such that it works. network.redraw() is not enough..

grtjn commented 6 years ago

According to this old ticket it was due to the fact the div was hidden which confuses canvas calculations. It was supposed to be fixed with v4, but i'm on latest (4.21.0), and still seeing issues if used inside an initially collapsed accordion div. Best way around for now it to brute force recreation of network graph, for instance using the reload flag. That does involve changing items reload to recreate ctrl.graphData, instead of using network.setData. It also requires recreating ctrl.items as watched by the directive, otherwise it won't trigger.