Skip to content

Commit

Permalink
Refactor: configuration is normal part of the scene
Browse files Browse the repository at this point in the history
  • Loading branch information
monfera committed Feb 14, 2019
1 parent 6c7eeec commit 7fa8a1b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ const preserveCurrentGroups = (shapes, selectedShapes) => ({ shapes, selectedSha
export const getScene = state => state.currentScene;

export const configuration = state => {
return state.configuration;
return state.currentScene.configuration;
};

export const getShapes = scene => scene.shapes;
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/canvas/public/lib/aeroelastic_kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const aeroelastic = {
const updateScene = state.select((nextScene, primaryUpdate) => ({
primaryUpdate,
currentScene: nextScene,
configuration: nextScene.configuration,
}))(layout.nextScene, layout.primaryUpdate);

stores.get(page).setUpdater(updateScene);
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/canvas/public/state/middleware/aeroelastic.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ export const aeroelastic = ({ dispatch, getState }) => {
aero.createStore(
{
primaryUpdate: null,
currentScene: { shapes: [] },
configuration: aeroelasticConfiguration,
currentScene: { shapes: [], configuration: aeroelasticConfiguration },
},
onChangeCallback,
page
Expand Down

0 comments on commit 7fa8a1b

Please sign in to comment.