Store left in var
parent
ccc18d1da5
commit
fd9dd2d7a4
|
@ -1,10 +1,12 @@
|
||||||
import React, {PropTypes} from 'react'
|
import React, {PropTypes} from 'react'
|
||||||
|
|
||||||
const calcStyle = (annotation, dygraph) => {
|
const calcStyle = (annotation, dygraph) => {
|
||||||
|
const left = `${dygraph.toDomXCoord(annotation.time)}px`
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
left,
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: '0px',
|
top: '0px',
|
||||||
left: `${dygraph.toDomXCoord(annotation.time)}px`,
|
|
||||||
backgroundColor: '#f00',
|
backgroundColor: '#f00',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
width: '2px',
|
width: '2px',
|
||||||
|
|
Loading…
Reference in New Issue