mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
layered projects working; with some bugs
This commit is contained in:
23
src/components/presentational/Timeline/Project.js
Normal file
23
src/components/presentational/Timeline/Project.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import React from 'react'
|
||||
import { sizes } from '../../../common/global'
|
||||
|
||||
export default ({
|
||||
id,
|
||||
offset,
|
||||
start,
|
||||
end,
|
||||
getX,
|
||||
dims,
|
||||
colour
|
||||
}) => {
|
||||
const length = getX(end) - getX(start)
|
||||
return <rect
|
||||
onClick={() => alert('TODO: associate all events')}
|
||||
className='project'
|
||||
x={getX(start)}
|
||||
y={dims.trackHeight - offset}
|
||||
width={length}
|
||||
style={{ fill: colour, fillOpacity: 0.1 }}
|
||||
height={2 * sizes.eventDotR}
|
||||
/>
|
||||
}
|
||||
Reference in New Issue
Block a user