This commit is contained in:
Thomas Nordquist
2019-06-04 23:03:53 +02:00
parent 1f9215a19f
commit 4f0b13bdc7
3 changed files with 3 additions and 6 deletions

View File

@@ -35,9 +35,6 @@ const style = (theme: Theme) => {
backgroundColor: theme.palette.primary.main,
},
},
hover: {
},
}
}
@@ -68,7 +65,7 @@ function tokensForLine(change: diff.Change, line: number, props: Props) {
const { classes, literalPositions } = props
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) {
return [diagram, <Add key="add" className={classes.icon} />]

View File

@@ -99,7 +99,7 @@ class CodeDiff extends React.Component<Props, State> {
<Popper
open={Boolean(this.state.diagram)}
anchorEl={diagram && diagram.anchorEl as any}
dir="left"
placement="left-end"
>
<Fade in={Boolean(this.state.diagram)} timeout={300}>
<Paper style={{ width: '300px' }}>

View File

@@ -45,7 +45,7 @@ export function toPlottableValue(value: any): number | undefined {
return floatVal
}
const intVal = parseInt(value)
const intVal = parseInt(value, undefined)
if (isNumber && !isNaN(intVal)) {
return intVal
}