Created
January 28, 2021 21:43
-
-
Save rschwabco/40b7d2da43e95544d2d012c0fcab7ba7 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fetchMachine = Machine({ | |
id: "root", | |
states: { | |
"Fleet Schedule": { | |
id: "Fleet Schedule", | |
states: { | |
Idle: { id: "Idle", states: {} }, | |
"Vessel Active": { | |
id: "Vessel Active", | |
states: {}, | |
on: { | |
onMouseOutVessel: "#Idle", | |
onVesselClick: "#Vessel In Details Panel", | |
}, | |
}, | |
"Vessel In Details Panel": { | |
id: "Vessel In Details Panel", | |
states: { | |
"Vessel Unassignment in Details Panel": { | |
id: "Vessel Unassignment in Details Panel", | |
states: {}, | |
}, | |
}, | |
initial: "Vessel Unassignment in Details Panel", | |
on: { | |
onMouseOutVessel: "#Vessel In Details Panel", | |
onRightClick: "#Vessel Unassignment in Details Panel", | |
}, | |
}, | |
"Requirement Active": { | |
id: "Requirement Active", | |
states: {}, | |
on: { | |
onDrag: "#Dragging", | |
onRequirementClick: "#Click Requirement", | |
}, | |
}, | |
"Click Requirement": { id: "Click Requirement", states: {} }, | |
"Right Click Requirement": { | |
id: "Right Click Requirement", | |
states: {}, | |
}, | |
Dragging: { | |
id: "Dragging", | |
states: {}, | |
on: { onDrop: "#Drop" }, | |
}, | |
Drop: { id: "Drop", states: {} }, | |
}, | |
initial: "Idle", | |
on: { | |
onMouseInRequirement: "#Requirement Active", | |
onMouseInVessel: "#Vessel Active", | |
onMouseOutRequirement: "#Idle", | |
}, | |
}, | |
}, | |
initial: "Fleet Schedule", | |
on: {}, | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment