Skip to content

Commit 0d91c7a

Browse files
Merge pull request #99 from ChristianEdwardPadilla/development
removed comments, changed html attr styling
2 parents b392f9b + 9a6a3d7 commit 0d91c7a

File tree

5 files changed

+3
-24
lines changed

5 files changed

+3
-24
lines changed

main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ function openFile() {
3333
mainWindow.webContents.send('new-file', file);
3434
}
3535

36-
// export files
37-
function exportComponents() {
38-
console.log('hi from exportComponents');
39-
}
40-
4136
// Choose directory
4237
ipcMain.on('choose_app_dir', (event) => {
4338
const directory = dialog.showOpenDialog(mainWindow, {

src/components/HtmlAttr.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const styles = theme => ({
2626
input: {
2727
color: '#fff',
2828
opacity: '0.7',
29-
marginBottom: '15px',
29+
marginBottom: '17px',
3030
},
3131
});
3232

@@ -46,7 +46,6 @@ class HtmlAttr extends Component {
4646
}, {});
4747

4848
handleSave = (attr) => {
49-
console.log(attr, this.state[attr]);
5049
this.props.updateHtmlAttr({ attr, value: this.state[attr] });
5150
this.setState({
5251
[attr]: '',

src/components/SortChildren.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,12 @@ class SortChildren extends Component {
4444

4545
onDragOver = idx => {
4646
this.setState({ draggedOverIndex: idx });
47-
// console.log(`onDragOver idx=${idx} this.state.draggedOverIndex:${this.state.draggedOverIndex}`)
4847
};
4948

5049
onDragEnd(e) {
5150
console.log(`dragEnd this
5251
state.draggedIndex: ${this.state.draggedIndex}
5352
this.state.draggedOverIndex: ${this.state.draggedOverIndex}`);
54-
//const {draggedIndex, draggedOverIndex } = this.state;
5553
if (
5654
this.state.draggedIndex === this.state.draggedOverIndex
5755
// || !this.state.draggedIndex || this.state.draggedOverIndex
@@ -60,15 +58,13 @@ class SortChildren extends Component {
6058
}
6159

6260
let currentSortValues = this.setLocalArray();
63-
// console.log(`currentSortValues`,JSON.stringify((currentSortValues)))
6461

6562
// remove the dragged Item and save it, we will use add it back in a moment.
6663
const draggedBaby = currentSortValues[this.state.draggedIndex];
6764
currentSortValues.splice(this.state.draggedIndex, 1);
6865

6966
// put back the dragge item after the dragged Over
7067
currentSortValues.splice(this.state.draggedOverIndex, 0, draggedBaby);
71-
//console.log(`currentSortValues after reAdding the dragged baby `,JSON.stringify(currentSortValues))
7268

7369
currentSortValues = currentSortValues.map((child, idx) => {
7470
return { childId: child.childId, childSort: idx + 1 };

src/containers/LeftContainer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ class LeftContainer extends Component<PropsInt, StateInt> {
152152
chooseAppDir = () => IPC.send('choose_app_dir');
153153

154154
showGenerateAppModal = () => {
155-
console.log('clicked on export button');
156155
const { closeModal, chooseGenOptions } = this;
157156
const { genOptions } = this.state;
158157
const children = (

src/utils/componentReducer.util.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ const initialComponentState: ComponentInt = {
2222
position: {
2323
x: 25,
2424
y: 25,
25-
width: 600,
26-
height: 400,
25+
width: 800,
26+
height: 550,
2727
},
2828
childrenArray: [],
2929
nextChildId: 1,
@@ -136,7 +136,6 @@ export const addChild = (
136136
);
137137
return;
138138
}
139-
// console.log(`htmlElemPosition: ${JSON.stringify(htmlElemPosition)}`);
140139
}
141140

142141
const newPosition = childType === 'COMP'
@@ -197,10 +196,6 @@ export const deleteChild = (
197196
calledFromDeleteComponent = false,
198197
},
199198
) => {
200-
console.log(`delete child here. state.focusChild.childId = ${state.focusChild.childId}
201-
state.focusComponent.id=${
202-
state.focusComponent.id
203-
} myPrms: parentId:${parentId} childId${childId} calledFromDeleteComponent:${calledFromDeleteComponent}`);
204199
/** ************************************************
205200
if no parameters are provided we default to delete the FOCUSED CHILD of the FOCUSED COMPONENTS
206201
however when deleting component we wnt to delete ALL the places where it's used, so we call this function
@@ -354,13 +349,11 @@ export const deleteComponent = (
354349
}
355350

356351
const indexToDelete = state.components.findIndex(comp => comp.id == componentId);
357-
console.log('index to delete: ', indexToDelete);
358352

359353
const componentsCopy = cloneDeep(state.components);
360354
componentsCopy.splice(indexToDelete, 1);
361355
const totalComponents = state.totalComponents - 1;
362356

363-
console.log(`Real delete component action here : id:${componentId}`);
364357
return {
365358
...state,
366359
totalComponents,
@@ -589,9 +582,6 @@ export const updateChildrenSort = (
589582
state: ApplicationStateInt,
590583
{ newSortValues }: { newSortValues: any },
591584
) => {
592-
console.log('hello from updateChildrenSort. newSortValues: ', newSortValues);
593-
594-
// const modifiedChildrenArray:ChildrenInt = JSON.parse(JSON.stringify(state.focusComponent.childrenArray)) ;
595585
const modifiedChildrenArray: ChildrenInt = cloneDeep(state.focusComponent.childrenArray);
596586

597587
for (let i = 0; i < modifiedChildrenArray.length; i += 1) {

0 commit comments

Comments
 (0)