return default opacity and size

This commit is contained in:
Lachlan Kermode
2020-04-06 14:38:58 +02:00
parent eac3eeaf93
commit 044c6cd34a
6 changed files with 31 additions and 20 deletions

4
.gitignore vendored
View File

@@ -1,7 +1,7 @@
.idea/
build/
node_modules/
config.js
*config.js
dev.config.js
tags
tags.lock
@@ -12,4 +12,4 @@ src/\.DS_Store
\.DS_Store
package-lock.json
tags
tags

View File

@@ -6,7 +6,7 @@ export const colors = {
}
export const sizes = {
eventDotR: 15
eventDotR: 8
}
export default {

View File

@@ -10,19 +10,7 @@ export default ({
styleProps,
extraRender
}) => (
<rect
onClick={onSelect}
className='event'
x={x}
y={y - 0.5 * r}
style={styleProps}
width={r}
height={r}
/>
)
/**
<circle
<circle
onClick={onSelect}
className='event'
cx={x}
@@ -30,4 +18,4 @@ export default ({
style={styleProps}
r={r}
/>
**/
)

View File

@@ -0,0 +1,23 @@
import React from 'react'
export default ({
category,
events,
x,
y,
r,
onSelect,
styleProps,
extraRender
}) => (
<rect
onClick={onSelect}
className='event'
x={x}
y={y - 0.5 * r}
style={styleProps}
width={r}
height={r}
/>
)

View File

@@ -80,7 +80,7 @@ const TimelineEvents = ({
fill: categoryColor,
fillOpacity: HAS_PROJECTS
? unlocatedEvents.some(ev => ev.projectOffset >= 0) ? getEventOpacity(unlocatedEvents) : 0.05
: getEventOpacity(unlocatedEvents) / 3
: getEventOpacity(unlocatedEvents)
}
const extraRender = customStyles[1]

View File

@@ -60,12 +60,12 @@ const initial = {
},
timeline: {
dimensions: {
height: 1000,
height: 250,
width: 0,
marginLeft: 100,
marginTop: 15,
marginBottom: 60,
contentHeight: 900,
contentHeight: 200,
width_controls: 100
},
range: [