@@ -72,71 +72,71 @@ class MainContainer extends Component {
72
72
constructor ( props ) {
73
73
super ( props ) ;
74
74
75
- IPC . on ( 'new-file' , ( event , file ) => {
76
- const image = new window . Image ( ) ;
77
- image . src = file ;
78
- this . props . changeImagePath ( file ) ;
79
- image . onload = ( ) => {
80
- this . setState ( { image } ) ;
81
- } ;
82
- this . draggableItems = [ ] ;
83
- } ) ;
84
-
85
- IPC . on ( 'app_dir_selected' , ( event , path ) => {
86
- const { components } = this . props ;
87
- const { genOption } = this . state ;
88
- this . props . createApp ( {
89
- path,
90
- components,
91
- genOption,
92
- } ) ;
93
- } ) ;
75
+ // IPC.on('new-file', (event, file) => {
76
+ // const image = new window.Image();
77
+ // image.src = file;
78
+ // this.props.changeImagePath(file);
79
+ // image.onload = () => {
80
+ // this.setState({ image });
81
+ // };
82
+ // this.draggableItems = [];
83
+ // });
84
+
85
+ // IPC.on('app_dir_selected', (event, path) => {
86
+ // const { components } = this.props;
87
+ // const { genOption } = this.state;
88
+ // this.props.createApp({
89
+ // path,
90
+ // components,
91
+ // genOption,
92
+ // });
93
+ // });
94
+ // }
95
+
96
+ // closeModal = () => this.setState({ modal: null });
97
+
98
+ // chooseAppDir = () => IPC.send('choose_app_dir');
99
+
100
+ // chooseGenOptions = (genOption) => {
101
+ // // set option
102
+ // this.setState({ genOption });
103
+ // // closeModal
104
+ // this.closeModal();
105
+ // // Choose app dir
106
+ // this.chooseAppDir();
107
+ // };
108
+
109
+ // showGenerateAppModal = () => {
110
+ // console.log('clicked on export button');
111
+ // const { closeModal, chooseGenOptions } = this;
112
+ // const { genOptions } = this.state;
113
+ // const children = (
114
+ // <List className="export-preference">
115
+ // {genOptions.map((option, i) => (
116
+ // <ListItem
117
+ // key={i}
118
+ // button
119
+ // onClick={() => chooseGenOptions(i)}
120
+ // style={{
121
+ // border: '1px solid #3f51b5',
122
+ // marginBottom: '2%',
123
+ // marginTop: '5%',
124
+ // }}
125
+ // >
126
+ // <ListItemText primary={option} style={{ textAlign: 'center' }} />
127
+ // </ListItem>
128
+ // ))}
129
+ // </List>
130
+ // );
131
+ // this.setState({
132
+ // modal: createModal({
133
+ // closeModal,
134
+ // children,
135
+ // message: 'Choose export preference:',
136
+ // }),
137
+ // });
94
138
}
95
139
96
- closeModal = ( ) => this . setState ( { modal : null } ) ;
97
-
98
- chooseAppDir = ( ) => IPC . send ( 'choose_app_dir' ) ;
99
-
100
- chooseGenOptions = genOption => {
101
- // set option
102
- this . setState ( { genOption } ) ;
103
- // closeModal
104
- this . closeModal ( ) ;
105
- // Choose app dir
106
- this . chooseAppDir ( ) ;
107
- } ;
108
-
109
- showGenerateAppModal = ( ) => {
110
- console . log ( 'clicked on export button' ) ;
111
- const { closeModal, chooseGenOptions } = this ;
112
- const { genOptions } = this . state ;
113
- const children = (
114
- < List className = "export-preference" >
115
- { genOptions . map ( ( option , i ) => (
116
- < ListItem
117
- key = { i }
118
- button
119
- onClick = { ( ) => chooseGenOptions ( i ) }
120
- style = { {
121
- border : '1px solid #3f51b5' ,
122
- marginBottom : '2%' ,
123
- marginTop : '5%' ,
124
- } }
125
- >
126
- < ListItemText primary = { option } style = { { textAlign : 'center' } } />
127
- </ ListItem >
128
- ) ) }
129
- </ List >
130
- ) ;
131
- this . setState ( {
132
- modal : createModal ( {
133
- closeModal,
134
- children,
135
- message : 'Choose export preference:' ,
136
- } ) ,
137
- } ) ;
138
- } ;
139
-
140
140
render ( ) {
141
141
const { draggable, scaleX, scaleY, modal, toggleClass } = this . state ;
142
142
const {
0 commit comments