此代码来自我之前帖子的回答。箭头很好,但如果我想通过设置将箭头移动到路径的末尾,mark = at position 1
仍然有一个突出的部分,看起来不太好看。
有什么办法可以删除这个部分吗?
\documentclass[tikz, border=1cm]{standalone}
\usepackage[american, siunitx, RPvoltages]{circuitikz}
\usetikzlibrary{decorations.markings, arrows.meta}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}
\ctikzset{inductors/scale=0.5, capacitors/scale=0.5, sources/scale=0.5, switches/scale=0.5}
\draw (0,0) coordinate (start) node[ocirc]{} to [cute open switch]
++(1,0) to [cute inductor, l^=$L$] ++(1,0) to [short]++(0.5,0) node[ocirc]{} coordinate (end);
\begin{scope}[on background layer, decoration={
markings, mark=at position 1 with {\arrow{Stealth[scale=0.8]}}} ]
\draw[ultra thick, red!40, postaction={decorate}, transform canvas={yshift=3pt}] (start) --(end);
\end{scope}
\end{tikzpicture}
\end{document}