My question refers to this question (I would comment there had I 50 reputation or more...).
I have a mindmap with arrows as in this question (motivated by this question) in a beamer document. I would like to reveal different children and arrows as I go.
Here's my tentative code (taken from several sources, amongst which Daniel's answer in here):
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{mindmap,trees,shadows}
\usetikzlibrary{shapes.arrows,calc,positioning}%%For arrows
\newcommand{\DrawArrowConnection}[5][]{
\path let \p1=($(#2)-(#3)$),\n1={0.25*veclen(\x1,\y1)} in
($(#2)!\n1!90:(#3)$) coordinate (#2-A)
($(#2)!\n1!270:(#3)$) coordinate (#2-B)
($(#3)!\n1!90:(#2)$) coordinate (#3-A)
($(#3)!\n1!270:(#2)$) coordinate (#3-B);
\foreach \Y in {A,B}
{
\pgfcoordinate{P-#2-\Y}{\pgfpointshapeborder{#2}{\pgfpointanchor{#3-\Y}{center}}}
\pgfcoordinate{P-#3-\Y}{\pgfpointshapeborder{#3}{\pgfpointanchor{#2-\Y}{center}}}
}
\shade let \p1=($(#2)-(#3)$),\n1={atan2(\y1,\x1)-90} in
[top color=#4,bottom color=#5,shading angle=\n1] (P-#2-A)
to[bend left=15] ($($(P-#2-A)!0.4!(P-#3-B)$)!0.25!($(P-#2-B)!0.4!(P-#3-A)$)$)
-- ($($(P-#2-A)!0.4!(P-#3-B)$)!3.14pt!270:(P-#3-B)$)
-- ($($(P-#2-A)!0.6!(P-#3-B)$)!0.25!($(P-#2-B)!0.4!(P-#3-A)$)$)
to[bend left=15] (P-#3-B) --
(P-#3-A) to[bend left=15]
($($(P-#3-A)!0.4!(P-#2-B)$)!0.25!($(P-#3-B)!0.6!(P-#2-A)$)$)
-- ($($(P-#3-A)!0.6!(P-#2-B)$)!3.14pt!270:(P-#2-B)$)
-- ($($(P-#3-A)!0.6!(P-#2-B)$)!0.25!($(P-#3-B)!0.6!(P-#2-A)$)$)
to[bend left=15] (P-#2-B) -- cycle;
}
\begin{document}
% Keys to support piece-wise uncovering of elements in TikZ pictures:
% \node[visible on=<2->](foo){Foo}
% \node[visible on=<{2,4}>](bar){Bar} % put braces around comma expressions
%
% Internally works by setting opacity=0 when invisible, which has the
% adavantage (compared to \node<2->(foo){Foo} that the node is always there, hence
% always consumes space plus that coordinate (foo) is always available.
%
% The actual command that implements the invisibility can be overriden
% by altering the style invisible. For instance \tikzsset{invisible/.style={opacity=0.2}}
% would dim the "invisible" parts. Alternatively, the color might be set to white, if the
% output driver does not support transparencies (e.g., PS)
%
\tikzset{
invisible/.style={opacity=0},
visible on/.style={alt={#1{}{invisible}}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
},
}
\begin{frame}
\begin{tikzpicture}
\path[mindmap, concept color=black, text=white,
level 1 concept/.append style={level distance=27mm, sibling angle=90},
level 2 concept/.append style={level distance=17mm, sibling angle=90},every node/.append style={scale=0.6}]
node[concept] {A}
[clockwise from=135]
child[concept color=blue,visible on=<8->] {
node(B)[concept] {B}
[clockwise from=135, level 2 concept/.append style={sibling angle=50}]
child {node[concept] {b1}}
}
child[concept color=green!60!black, visible on=<5->] {
node(C)[concept] {C}
[clockwise from=90]
child{node(c1)[concept,visible on=<6->] {c1}}
child{node(c2)[concept,visible on=<7->] {c2}}}
child[concept color=red!60!black, visible on=<2->] {
node[concept] {D}
[clockwise from=0]
child{node[concept, visible on=<3->] {d1}}
child{node[concept, visible on=<4->] {d2}}
}
child[concept color=yellow!60!black,visible on=<8->] {
node[concept] {E}
}
;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
%%%%%%%%%%%%%% CONNECTIONS
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DrawArrowConnection{c1}{c2}{green!60!black}{green!60!black}
\end{tikzpicture}
\end{frame}
\end{document}
The first problem I encounter is that when children in level 2 are revealed, the links to children in level 3 are also revealed (before the children). How can I solve that?
Secondly, I do not know how to modify the code so the arrows don't appear all the time.
Could you help me? Thanks!

