Consume mode info from the VM
This commit is contained in:
1 parent
fb39799700
commit
3bd5abfc26
2 files changed
+6
-2
No files matched your search
@@ -16,10 +16,13 @@ const MonitorList = props => (
|
||||
<Monitor
|
||||
id={monitorData.id}
|
||||
key={monitorData.id}
|
||||
mode={monitorData.mode}
|
||||
opcode={monitorData.opcode}
|
||||
params={monitorData.params}
|
||||
spriteName={monitorData.spriteName}
|
||||
value={monitorData.value}
|
||||
x={monitorData.x}
|
||||
y={monitorData.y}
|
||||
onDragEnd={props.onMonitorChange}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -19,9 +19,9 @@ class Monitor extends React.Component {
|
||||
'setElement'
|
||||
]);
|
||||
|
||||
// @todo this eventually will be stored in the VM
|
||||
// @todo consume from VM, but need to store until there are APIs to update vm
|
||||
this.state = {
|
||||
type: 'default'
|
||||
type: props.mode
|
||||
};
|
||||
}
|
||||
componentDidMount () {
|
||||
@@ -101,6 +101,7 @@ class Monitor extends React.Component {
|
||||
Monitor.propTypes = {
|
||||
addMonitorRect: PropTypes.func.isRequired,
|
||||
id: PropTypes.string.isRequired,
|
||||
mode: PropTypes.oneOf(['default', 'slider', 'large', 'list']),
|
||||
monitorLayout: PropTypes.shape({
|
||||
monitors: PropTypes.object,
|
||||
savedMonitorPositions: PropTypes.object
|
||||
|
||||
Reference in new issue
Block a user