check for USE_CATEGORIES

This commit is contained in:
Lachlan Kermode
2020-10-21 16:57:26 +03:00
parent a66bc3a896
commit 59d2685879
2 changed files with 8 additions and 9 deletions

View File

@@ -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
}

View File

@@ -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