cabana :pause when a canlog entry is expanded
parent
9cee4f7ee6
commit
c53d36ac36
|
@ -16,7 +16,8 @@ export default class CanLog extends Component {
|
|||
onSignalUnplotPressed: PropTypes.func,
|
||||
onSignalPlotPressed: PropTypes.func,
|
||||
message: PropTypes.object,
|
||||
messageIndex: PropTypes.number
|
||||
messageIndex: PropTypes.number,
|
||||
onMessageExpanded: PropTypes.func
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
|
@ -82,6 +83,7 @@ export default class CanLog extends Component {
|
|||
// messageHeights[msgIdx] = TODO dynamic height calc if message expanded.
|
||||
// Also could pre-compute height of each message Id instead of row (as signals are consistent), which would be cheaper.
|
||||
this.setState({expandedMessages: this.state.expandedMessages.concat([msg.time])})
|
||||
this.props.onMessageExpanded();
|
||||
}
|
||||
|
||||
collapseMessage(msg, msgIdx) {
|
||||
|
|
|
@ -11,7 +11,7 @@ export default class PartSelector extends Component {
|
|||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
console.log('PartSelector', props);
|
||||
|
||||
this.state = {
|
||||
selectedPartStyle: this.makePartStyle(props.partsCount, 0),
|
||||
selectedPart: 0
|
||||
|
@ -19,7 +19,6 @@ export default class PartSelector extends Component {
|
|||
}
|
||||
|
||||
makePartStyle(partsCount, selectedPart) {
|
||||
console.log('makePartStyle', partsCount, selectedPart);
|
||||
return StyleSheet.create({
|
||||
selectedPart: {
|
||||
left: (selectedPart / partsCount) * PartSelector.selectorWidth,
|
||||
|
@ -57,4 +56,4 @@ const Styles = StyleSheet.create({
|
|||
backgroundColor: 'black',
|
||||
height: '100%'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -234,7 +234,8 @@ export default class Explorer extends Component {
|
|||
plottedSignals={this.state.plottedSignals}
|
||||
onSignalPlotPressed={this.onSignalPlotPressed}
|
||||
onSignalUnplotPressed={this.onSignalUnplotPressed}
|
||||
showAddSignal={this.showAddSignal} />
|
||||
showAddSignal={this.showAddSignal}
|
||||
onMessageExpanded={this.onPause} />
|
||||
</div>
|
||||
<div className={css(Styles.right)}>
|
||||
{this.props.messages[this.props.selectedMessage] !== undefined ?
|
||||
|
|
|
@ -170,16 +170,6 @@ const Styles = StyleSheet.create({
|
|||
margin: 0,
|
||||
padding: 0
|
||||
},
|
||||
progressBar: {
|
||||
height: 30,
|
||||
width: '100%',
|
||||
borderColor: 'rgba(0,0,0,0.5)',
|
||||
border: 'solid 1px',
|
||||
marginBottom: 10
|
||||
},
|
||||
progressBarInner: {
|
||||
backgroundColor: 'rgba(0,0,0,0.9)'
|
||||
},
|
||||
loadDbc: {
|
||||
cursor: 'pointer',
|
||||
':hover': {
|
||||
|
|
Loading…
Reference in New Issue