From 044c6cd34a7eea44b1d44e0b1f5a49c371a5fae0 Mon Sep 17 00:00:00 2001 From: Lachlan Kermode Date: Mon, 6 Apr 2020 14:38:58 +0200 Subject: [PATCH] return default opacity and size --- .gitignore | 4 ++-- src/common/global.js | 2 +- .../presentational/Timeline/DatetimeDot.js | 16 ++----------- .../presentational/Timeline/DatetimeSquare.js | 23 +++++++++++++++++++ .../presentational/Timeline/Events.js | 2 +- src/store/initial.js | 4 ++-- 6 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 src/components/presentational/Timeline/DatetimeSquare.js diff --git a/.gitignore b/.gitignore index 1f4ab70..f893449 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file +tags diff --git a/src/common/global.js b/src/common/global.js index 8ec4a00..e6d1991 100644 --- a/src/common/global.js +++ b/src/common/global.js @@ -6,7 +6,7 @@ export const colors = { } export const sizes = { - eventDotR: 15 + eventDotR: 8 } export default { diff --git a/src/components/presentational/Timeline/DatetimeDot.js b/src/components/presentational/Timeline/DatetimeDot.js index 1c96524..1eff3e5 100644 --- a/src/components/presentational/Timeline/DatetimeDot.js +++ b/src/components/presentational/Timeline/DatetimeDot.js @@ -10,19 +10,7 @@ export default ({ styleProps, extraRender }) => ( - - -) -/** - - **/ +) diff --git a/src/components/presentational/Timeline/DatetimeSquare.js b/src/components/presentational/Timeline/DatetimeSquare.js new file mode 100644 index 0000000..d62afd9 --- /dev/null +++ b/src/components/presentational/Timeline/DatetimeSquare.js @@ -0,0 +1,23 @@ +import React from 'react' + +export default ({ + category, + events, + x, + y, + r, + onSelect, + styleProps, + extraRender +}) => ( + + +) diff --git a/src/components/presentational/Timeline/Events.js b/src/components/presentational/Timeline/Events.js index 257942a..6ac5e29 100644 --- a/src/components/presentational/Timeline/Events.js +++ b/src/components/presentational/Timeline/Events.js @@ -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] diff --git a/src/store/initial.js b/src/store/initial.js index eba08f2..8cc7040 100644 --- a/src/store/initial.js +++ b/src/store/initial.js @@ -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: [