puremadeleine / viewith-client

0 stars 0 forks source link

seatmap #2

Open yunyezl opened 2 weeks ago

yunyezl commented 2 weeks ago

Description

Requirements

yunyezl commented 2 weeks ago
sequenceDiagram
    participant User
    participant SeatMap
    participant _SeatMapState
    participant AssetBundle
    participant xml.XmlDocument
    participant PathPrinter
    participant PathPainter

    User ->> SeatMap: Load SeatMap
    SeatMap ->> _SeatMapState: Create State
    _SeatMapState ->> AssetBundle: Load SVG file (assetName)
    AssetBundle -->> _SeatMapState: Return SVG data
    _SeatMapState ->> xml.XmlDocument: Parse SVG data
    xml.XmlDocument -->> _SeatMapState: Return xml path elements
    _SeatMapState ->> PathPrinter: Create SeatSection using xml path (transform to flutter path from xml path)
    _SeatMapState -->> SeatMap: Set sections state

    User ->> _SeatMapState: Tap on screen
    _SeatMapState ->> _SeatMapState: Handle tap and find section
    _SeatMapState ->> _SeatMapState: Change section color
    _SeatMapState ->> PathPainter: Repaint paths with new colors

    PathPainter -->> SeatMap: Render updated paths