@@ -4,12 +4,10 @@ import PythonControlledCapability from "geppetto-client/js/communication/geppett
44
55import {
66 activateWidget ,
7- destroyWidget ,
8- minimizeWidget ,
9- maximizeWidget ,
7+ setWidgets ,
108 updateWidget ,
119 newWidget
12- } from "../redux/actions/flexlayout " ;
10+ } from "../redux/actions/layout " ;
1311import { openBackendErrorDialog , closeBackendErrorDialog } from '../redux/actions/errors' ;
1412import {
1513 updateCards , editModel , simulateNetwork , createNetwork ,
@@ -79,8 +77,14 @@ export const Dimensions = connect(
7977
8078import _NetPyNE from "./NetPyNE" ;
8179export const NetPyNE = connect (
82- state => ( { editMode : state . general . editMode } ) ,
83- pythonCallErrorDispatch
80+ null ,
81+ dispatch => ( {
82+ pythonCallErrorDialogBox : payload => dispatch ( openBackendErrorDialog ( payload ) ) ,
83+ setWidgets : payload => dispatch ( setWidgets ( payload ) ) ,
84+ modelLoaded : ( ) => dispatch ( modelLoaded ) ,
85+ newWidget : widget => dispatch ( newWidget ( widget ) ) ,
86+ activateWidget : widgetId => dispatch ( activateWidget ( widgetId ) )
87+ } )
8488) ( _NetPyNE ) ;
8589
8690import _NetPyNECellRule from "./definition/cellRules/NetPyNECellRule" ;
@@ -90,17 +94,8 @@ export const NetPyNECellRule = connect((state, ownProps) => ({
9094} ) ) ( _NetPyNECellRule ) ;
9195
9296
93- import _LayoutManager from "./layout/LayoutManager" ;
94- export const LayoutManager = connect (
95- state => ( { ...state . flexlayout , editMode : state . general . editMode } ) ,
96- dispatch => ( {
97- updateWidget : widget => dispatch ( updateWidget ( widget ) ) ,
98- minimizeWidget : id => dispatch ( minimizeWidget ( id ) ) ,
99- destroyWidget : id => dispatch ( destroyWidget ( id ) ) ,
100- maximizeWidget : id => dispatch ( maximizeWidget ( id ) ) ,
101- activateWidget : id => dispatch ( activateWidget ( id ) )
102- } )
103- ) ( _LayoutManager ) ;
97+ import { getInstance as getLayoutManagerInstance } from "./layout/LayoutManager" ;
98+ export const LayoutManager = ( ) => connect ( state => ( { layout : state . layout , } ) ) ( getLayoutManagerInstance ( ) . getComponent ( ) ) ;
10499
105100
106101import _NetPyNEPopulation from "./definition/populations/NetPyNEPopulation" ;
@@ -196,22 +191,11 @@ export const ActionDialog = connect(
196191 } )
197192) ( _ActionDialog )
198193
199- import _NetPyNEPythonConsole from './general/NetPyNEPythonConsole'
200- export const NetPyNEPythonConsole = connect (
201- null ,
202- dispatch => ( {
203- modelLoaded : ( ) => dispatch ( modelLoaded ) ,
204- newWidget : widget => dispatch ( newWidget ( widget ) ) ,
205- activateWidget : widgetId => dispatch ( activateWidget ( widgetId ) )
206- } )
207- ) ( _NetPyNEPythonConsole )
194+ export { NetPyNEPythonConsole } from './general/NetPyNEPythonConsole' ;
208195
209196import _Drawer from './settings/Drawer'
210197export const Drawer = connect (
211- state => ( {
212- widgets : state . flexlayout . widgets ,
213- editMode : state . general . editMode
214- } ) ,
198+ state => ( { editMode : state . general . editMode , layout : state . layout } ) ,
215199 dispatch => ( {
216200 updateWidget : newConf => dispatch ( updateWidget ( newConf ) ) ,
217201 newWidget : widget => dispatch ( newWidget ( widget ) ) ,
0 commit comments