4844576c3b
Adds a new "basic" animation mode that uses React Flow's native animated
dashes — the entire stroke moves as dashes, with no solid line underneath.
Distinct from "snake" (moving dot) and "flow" (overlay on solid line).
- Frontend: new Basic button in EdgeModal, animMode mapping, passes
animated={true} to BaseEdge when mode is "basic"
- Backend: normalize_animated accepts "basic" as a valid value
- Tests: EdgeModal + canvas round-trip tests for basic mode
10 lines
368 B
Python
10 lines
368 B
Python
def normalize_animated(v: object) -> str:
|
|
"""Normalize legacy bool/int animated values to string mode ('none'/'snake'/'flow')."""
|
|
if v is True or v == 1 or v == '1':
|
|
return 'snake'
|
|
if v is False or v == 0 or v == '0' or v is None or v == 'none':
|
|
return 'none'
|
|
if v in ('snake', 'flow', 'basic'):
|
|
return str(v)
|
|
return 'none'
|