Skip to content

Commit

Permalink
feat: disallowed dims rule (#144)
Browse files Browse the repository at this point in the history
* feat: get disallowed dims by vis type

* feat: exported getDisallowedDims
  • Loading branch information
martinkrulltott authored and janhenrikoverland committed Nov 14, 2019
1 parent 25e5383 commit 0789d7a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export {

// Modules: layoutUiRules

export { getAvailableAxes } from './modules/layoutUiRules'
export { getAvailableAxes, getDisallowedDims } from './modules/layoutUiRules'

// Visualizations

Expand Down
8 changes: 7 additions & 1 deletion src/modules/layoutUiRules/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { getAvailableAxesByRules } from './rulesHelper'
import {
getAvailableAxesByRules,
getDisallowedDimsByRules,
} from './rulesHelper'
import { getRulesByVisType } from './rules'

export const getAvailableAxes = visType =>
getAvailableAxesByRules(getRulesByVisType(visType))

export const getDisallowedDims = visType =>
getDisallowedDimsByRules(getRulesByVisType(visType))
2 changes: 2 additions & 0 deletions src/modules/layoutUiRules/rulesHelper.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const getAvailableAxesByRules = rules => rules.availableAxes || []

export const getDisallowedDimsByRules = rules => rules.disallowedDims || []

// TODO: implement all rules

0 comments on commit 0789d7a

Please sign in to comment.