diff --git a/example.config.js b/example.config.js index a159c4c..e260de3 100644 --- a/example.config.js +++ b/example.config.js @@ -21,13 +21,10 @@ module.exports = { // tiles: 'your-mapbox-account-name/x5678-map-id' }, features: { - USE_CATEGORIES: true, - CATEGORIES_AS_FILTERS: true, + USE_CATEGORIES: false, USE_ASSOCIATIONS: true, - USE_SOURCES: true, + USE_SOURCES: false, USE_COVER: true, - USE_SITES: false, - USE_SHAPES: false, GRAPH_NONLOCATED: false, HIGHLIGHT_GROUPS: false } diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index 58b0a3d..f7bca34 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -268,14 +268,16 @@ class Timeline extends React.Component { } getY (event) { + const { features, domain } = this.props + const { USE_CATEGORIES, GRAPH_NONLOCATED } = features const { categories } = domain + const categoriesExist = USE_CATEGORIES && categories && categories.length > 0 - const categoriesExist = categories && categories.length > 0 - const { GRAPH_NONLOCATED } = features - - if (!categoriesExist) { return this.state.dims.trackHeight / 2 } + if (!categoriesExist) { + return this.state.dims.trackHeight / 2 + } const { category, project } = event