Clean up
This commit is contained in:
@@ -35,9 +35,6 @@ const style = (theme: Theme) => {
|
|||||||
backgroundColor: theme.palette.primary.main,
|
backgroundColor: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
hover: {
|
|
||||||
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +65,7 @@ function tokensForLine(change: diff.Change, line: number, props: Props) {
|
|||||||
const { classes, literalPositions } = props
|
const { classes, literalPositions } = props
|
||||||
|
|
||||||
const literal = literalPositions[line]
|
const literal = literalPositions[line]
|
||||||
const diagram = literal ? <ChartIcon classes={{ icon: props.classes.icon, hover: props.classes.hover }} literal={literal} showDiagram={props.showDiagram} hideDiagram={props.hideDiagram}/> : null
|
const diagram = literal ? <ChartIcon classes={{ icon: props.classes.icon }} literal={literal} showDiagram={props.showDiagram} hideDiagram={props.hideDiagram}/> : null
|
||||||
|
|
||||||
if (change.added) {
|
if (change.added) {
|
||||||
return [diagram, <Add key="add" className={classes.icon} />]
|
return [diagram, <Add key="add" className={classes.icon} />]
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class CodeDiff extends React.Component<Props, State> {
|
|||||||
<Popper
|
<Popper
|
||||||
open={Boolean(this.state.diagram)}
|
open={Boolean(this.state.diagram)}
|
||||||
anchorEl={diagram && diagram.anchorEl as any}
|
anchorEl={diagram && diagram.anchorEl as any}
|
||||||
dir="left"
|
placement="left-end"
|
||||||
>
|
>
|
||||||
<Fade in={Boolean(this.state.diagram)} timeout={300}>
|
<Fade in={Boolean(this.state.diagram)} timeout={300}>
|
||||||
<Paper style={{ width: '300px' }}>
|
<Paper style={{ width: '300px' }}>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export function toPlottableValue(value: any): number | undefined {
|
|||||||
return floatVal
|
return floatVal
|
||||||
}
|
}
|
||||||
|
|
||||||
const intVal = parseInt(value)
|
const intVal = parseInt(value, undefined)
|
||||||
if (isNumber && !isNaN(intVal)) {
|
if (isNumber && !isNaN(intVal)) {
|
||||||
return intVal
|
return intVal
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user