Skip to content

Commit c550136

Browse files
author
Emma Genesen
committed
merged Chris' updates with tutorial and right sidebar updates
2 parents 161a934 + 7bd221e commit c550136

File tree

8 files changed

+4
-59
lines changed

8 files changed

+4
-59
lines changed

extractor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ const getVueFiles = (package = "iview") => {
8080
return vueFilePathList;
8181
};
8282

83-
console.log(getVueFiles());
8483

8584
//work with documentation for parse vue to work out how to use this
8685
function parseVueFile(path) {
@@ -89,7 +88,7 @@ function parseVueFile(path) {
8988
return parsedFile
9089
}
9190

92-
console.log(parseVueFile(getVueFiles()[0]))
91+
9392

9493
function generateImportObjs(pathList) { // or something
9594
// iterate through paths

src/components/Canvas.vue

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<!-- https://www.npmjs.com/package/vue-draggable-resizable -->
1717
<p class="cssContainerText"> {{this.activeRoute}} Preview </p>
1818
<!--each component box in canvas will have these properties-->
19-
<!-- :onDragStart="recordInitialPosition" :onResizeStart="recordInitialSize" :preventDeactivation="true" graveyard attribute -->
2019
<vue-draggable-resizable
2120
class-name="component-box"
2221
v-for="componentData in activeRouteArray"
@@ -347,7 +346,6 @@
347346
import { useExportComponent } from "./composables/useExportComponent.js";
348347
import { mapState, mapActions } from "vuex";
349348
import VueDraggableResizable from "vue-draggable-resizable/src/components/vue-draggable-resizable.vue";
350-
// import Vue3DraggableResizable from 'vue3-draggable-resizable'
351349
import VueMultiselect from "vue-multiselect";
352350
import "vue-draggable-resizable/src/components/vue-draggable-resizable.css";
353351
import 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css'
@@ -360,7 +358,6 @@ const cloneDeep = require("lodash.clonedeep");
360358
export default {
361359
name: "Canvas",
362360
components: {
363-
// Vue3DraggableResizable,
364361
VueDraggableResizable,
365362
VueMultiselect,
366363
ColorPicker,
@@ -374,8 +371,6 @@ export default {
374371
noteModal: false,
375372
colorModal: false,
376373
mockImg: false,
377-
// initialPosition: { x: 0, y: 0 },
378-
// initialSize: { w: 0, h: 0 },
379374
htmlElements: [],
380375
childrenSelected: [],
381376
};
@@ -523,21 +518,7 @@ export default {
523518
useExportComponentBound() {
524519
useExportComponent.bind(this)();
525520
},
526-
// !records component's initial position in case of drag - CHRIS: probably don't need this function?
527-
// recordInitialPosition: function (e) {
528-
// if (this.activeComponent !== e.target.id) {
529-
// if (e.target.parentElement?.classList.contains('draggable')) {
530-
// // this.setActiveComponent(e.target.parentElement.id)
531-
// }
532-
// else if (typeof `${e.target.id}` !== 'number') {
533-
// // this.setActiveComponent(e.target.id);
534-
// }
535-
// }
536-
// this.initialPosition.x = this.activeComponentData.x;
537-
// this.initialPosition.y = this.activeComponentData.y;
538-
// },
539521
isElementPlus(htmlList) {
540-
console.log(htmlList);
541522
return htmlList.find(({ text }) => text[0] === 'e');
542523
},
543524
//color change function
@@ -551,14 +532,6 @@ export default {
551532
this.updateColor(payload)
552533
this.refresh();
553534
},
554-
555-
// records component's initial size/position in case of resize (also graveyard - dont need initial size?)
556-
// recordInitialSize: function (e) {
557-
// this.initialSize.h = this.activeComponentData.h;
558-
// this.initialSize.w = this.activeComponentData.w;
559-
// this.initialPosition.x = this.activeComponentData.x;
560-
// this.initialPosition.y = this.activeComponentData.y;
561-
// },
562535
// sets component's ending size/position
563536
finishedResize: function (x, y, w, h) {
564537
let payload = {
@@ -570,19 +543,12 @@ export default {
570543
routeArray: this.routes[this.activeRoute],
571544
activeComponentData: this.activeComponentData,
572545
};
573-
// if (
574-
// payload.x !== this.initialPosition.x ||
575-
// payload.y !== this.initialPosition.y ||
576-
// payload.w !== this.initialSize.w ||
577-
// payload.h !== this.initialSize.h
578-
// ) {
579546
this.updateComponentSize(payload);
580547
this.updateComponentGridPosition(payload);
581-
// }
582548
this.refresh();
583549
},
584550
585-
//refresh function - super ghetto refresh function
551+
// refresh function
586552
refresh() {
587553
const payload = {
588554
activeComponent: this.activeComponent,
@@ -595,7 +561,7 @@ export default {
595561
payload.z--;
596562
this.updateComponentLayer(payload);
597563
},
598-
//!drag and drop function
564+
// drag and drop function
599565
finishedDrag: function (x, y) {
600566
let payload = {
601567
x: x,
@@ -647,12 +613,11 @@ export default {
647613
648614
// renders modal with Update Children and Layer in it
649615
handleAddNotes() {
650-
console.log(this.activeComponentData);
651616
if (this.wasDragged === false && this.activeComponent !== '') {
652617
this.openNoteModal();
653618
}
654619
},
655-
//color editor - opens the pop up
620+
//color editor - opens the pop up
656621
handleEditColor() {
657622
if (this.wasDragged === false && this.activeComponent !== '') {
658623
this.openColorModal();
@@ -894,7 +859,6 @@ behavior: url(/pie/PIE.htc);
894859
height: 720px;
895860
background-color: rgba(223, 218, 218, 0.886);
896861
background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
897-
// background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
898862
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px),
899863
-webkit-linear-gradient(0, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
900864
-webkit-linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
@@ -973,15 +937,13 @@ behavior: url(/pie/PIE.htc);
973937
.component-box {
974938
color: $menutext;
975939
border: 1.2px dashed $darktext;
976-
// background-color: rgba($darktext, .42);
977940
-webkit-transition: background-color 200ms linear;
978941
-ms-transition: background-color 200ms linear;
979942
transition: background-color 200ms linear;
980943
position: absolute;
981944
}
982945
983946
.active {
984-
// background-color: rgba($secondary, .42);
985947
border: 3px solid $primary;
986948
}
987949

src/components/composables/useCreateComponent.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ export function useCreateComponent(importObj) {
2828
return false;
2929
}
3030
// boilerplate properties for each component upon creation
31-
console.log(importObj.parent);
32-
console.log({ y: importObj?.parent?.y })
3331
const component = {
3432
x: importObj?.parent?.x ?? 0,
3533
y: importObj?.parent?.y ?? 0,
@@ -68,9 +66,4 @@ export function useCreateComponent(importObj) {
6866
}
6967
createComponent(importObj)
7068

71-
// console logging all components from Element Plus to determine shape of data and investigate structure of components
72-
// console.log(ElementPlus)
73-
// components all within giant object
7469
}
75-
76-
//

src/components/left-sidebar/ComponentTab/ImportLibraryButton.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
}
3434
this.changeLibComponentDisplay(payload);
3535
this.changeLib(payload);
36-
// console.log(this.$store.state.importLibraries.includes('element'));
3736
},
3837
3938

src/components/left-sidebar/ComponentTab/ParentMultiselect.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export default {
4444
// 'routes'
4545
]),
4646
options() {
47-
console.log(this.routes);
4847
return this.routes[this.activeRoute].map(
4948
(component) => component.componentName
5049
);

src/components/nav-buttons/ExportMenu.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,7 @@ test('renders ${componentName}', () => {
482482
writeStyle(componentName) {
483483
let htmlArray = this.componentMap[componentName].htmlList;
484484
let styleString = "";
485-
console.log(componentName);
486485
// Add grid css property to view component div
487-
if (this.routes)
488486
// adds view component id grid style and adds child component css styling
489487
if (this.routes.hasOwnProperty(componentName)) {
490488
styleString += `#${componentName} {\n\tdisplay: grid; \n\tgrid-template-columns: repeat(${this.gridLayout[0]}, 1fr);\n\tgrid-template-rows: repeat(${this.gridLayout[1]}, 1fr);\n\tgrid-column-gap: 0px;\n\tgrid-row-gap: 0px;\n}\n`;

src/layouts/MyLayout.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ export default {
279279
280280
},
281281
syncOauthGitFlag(e) {
282-
console.log(this.$store.state.exportOauthGithub);
283282
284283
let checkboxValue;
285284
if (e.target.value === "off") {
@@ -288,7 +287,6 @@ export default {
288287
checkboxValue = "off";
289288
}
290289
this.$store.commit("EXPORT_OAUTH_GIT", checkboxValue);
291-
console.log(this.$store.state.exportOauthGithub);
292290
293291
},
294292
clickedUndo() {

src/store/mutations.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,6 @@ const mutations = {
10781078

10791079
// change grid density
10801080
[types.CHANGE_GRID_DENSITY]: (state, payload) => {
1081-
// state.gridLayout = payload.direction === 'height' ? [state.gridLayout[0], payload.densityNum]:[payload.densityNum, state.gridLayout[1]];
1082-
// console.log(payload);
10831081
if (payload.direction === 'height'){
10841082
state.gridLayout[1] = payload.densityNum;
10851083

@@ -1100,7 +1098,6 @@ const mutations = {
11001098
updatedComponent.y = (rowStart - 1) * state.containerW / state.gridLayout[0];
11011099
updatedComponent.w = (colEnd - 1) * state.containerH / state.gridLayout[1] - updatedComponent.y;
11021100
updatedComponent.h = (rowEnd - 1) * state.containerW / state.gridLayout[0] - updatedComponent.x;
1103-
// Math.round((rowEnd - 1) * state.containerW / state.gridLayout[0]) - updatedComponent.x
11041101
}
11051102
);
11061103
},

0 commit comments

Comments
 (0)