"}],"\\nelement. This example creates a custom edge that animates a circle along the edge\\npath."]}],"\\n","$L1b","\\n",["$","h2",null,{"id":"animating-other-nodes","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":["Animating other nodes",["$","$L1a",null,{"id":"animating-other-nodes"}]]}],"\\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["If you want to animate more than SVG along an edge, you can do that with the\\nWeb Animations API. This example demonstrates how to animate another node in the\\nflow along an edge path by using the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"offsetPath"}]," property and animating the\\n",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"offsetDistance"}]," property."]}],"\\n","$L1c","\\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"There are some important details in this example to take note of:"}],"\\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\\n",["$","li",null,{"className":"x:my-[.5em]","children":["\\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["The animated node has its ",["$","$L1d",null,{"href":"/api-reference/types/node#draggable","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"draggable"}]}],"\\nproperty set to ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"false"}]," while the animation is running. This prevents a user\\nmoving the node around and breaking the animation path."]}],"\\n"]}],"\\n",["$","li",null,{"className":"x:my-[.5em]","children":["\\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["The animation path and the animation itself are set up in separate ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"useEffect"}],"\\nhooks. This lets the animation continue playing smoothly even if the edge path\\nis recalculated (for example when the source or target nodes are dragged.)"]}],"\\n"]}],"\\n"]}]]]}]]}]]}]}]\n'])