Skip to content
Snippets Groups Projects
Commit 3bd5abfc authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Consume mode info from the VM

parent fb397997
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment