{ | |
id: 'Root', | |
initial: 'after map loaded', | |
states: { | |
'before map loaded': { | |
on: {}, | |
states: {} | |
}, | |
'after map loaded': { | |
on: {}, | |
states: { | |
'route color': { | |
on: {}, | |
states: {} | |
}, | |
'map style': { | |
on: {}, | |
states: {} | |
}, | |
'gpx upload': { | |
on: {}, | |
states: { | |
pending: { | |
on: {}, | |
states: {} | |
}, | |
failure: { | |
on: {}, | |
states: {} | |
}, | |
success: { | |
on: {}, | |
states: {}, | |
type: 'parallel' | |
} | |
} | |
} | |
}, | |
type: 'parallel', | |
initial: 'route color' | |
} | |
}, | |
on: {} | |
} |
This comment has been minimized.
This comment has been minimized.
將 //
const subMachine = {
type: 'parallel',
states: {
'route color': {
on: {},
states: {}
},
'map style': {
on: {},
states: {}
}
}
}
//
const main = {
id: 'Root',
initial: 'before map loaded',
states: {
'before map loaded': {
on: {},
states: {}
},
'after map loaded': {
initial: 'route color',
on: {},
states: {
loading: {
on: {},
states: {
pending: {
on: {},
states: {}
},
failure: {
on: {},
states: {}
},
success: {
on: {},
states: {},
}
}
},
'before load': {
on: {},
states: subMachine
},
'after load': {
on: {},
states: subMachine
}
}
}
},
on: {}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.