miso-flow
LicenseBSD3-style (see the file LICENSE)
Safe HaskellNone
LanguageHaskell2010

Miso.Flow.Utils.Marker

Description

Pure port of utils/marker.ts from @xyflow/system.

Synopsis

Documentation

getMarkerId :: Maybe EdgeMarkerType -> Maybe MisoString -> MisoString Source #

Stable id for a marker; port of getMarkerId. Inline markers are keyed by their sorted key=value fields (matching the TS object-key serialization), marker references use their name directly.

createMarkerIds Source #

Arguments

:: [Edge e] 
-> Maybe MisoString

flow id

-> Maybe MisoString

default color

-> Maybe EdgeMarkerType

default marker start

-> Maybe EdgeMarkerType

default marker end

-> [MarkerProps] 

All distinct inline markers used by the given edges, with their ids; port of createMarkerIds.