@@ -12,7 +12,7 @@ Description:
1212 v-on:click =" handleClick"
1313 >
1414 <!-- This is the actual component box -->
15- <!-- https://www.npmjs.com/package/vue-draggable-resizable -->
15+ <!-- https://www.npmjs.com/package/vue-draggable-resizable -->
1616 <vue-draggable-resizable
1717 class-name =" component-box"
1818 v-for =" componentData in activeRouteArray"
@@ -90,15 +90,15 @@ Description:
9090
9191<script >
9292import { mapState , mapActions } from " vuex" ;
93- import VueDraggableResizable from ' vue-draggable-resizable/src/components/vue-draggable-resizable.vue'
94- import ' vue-draggable-resizable/src/components/vue-draggable-resizable.css'
93+ import VueDraggableResizable from " vue-draggable-resizable/src/components/vue-draggable-resizable.vue" ;
94+ import " vue-draggable-resizable/src/components/vue-draggable-resizable.css" ;
9595
96- const cloneDeep = require (' lodash.clonedeep' )
96+ const cloneDeep = require (" lodash.clonedeep" );
9797
9898export default {
9999 name: " ComponentDisplay" ,
100100 components: {
101- // VueDraggableResizable,
101+ VueDraggableResizable,
102102 },
103103 data () {
104104 // console.log("Current Component Map is: ", this.componentMap);
@@ -109,7 +109,7 @@ export default {
109109 mockImg: false ,
110110 initialPosition: { x: 0 , y: 0 },
111111 initialSize: { w: 0 , h: 0 },
112- htmlElements: [],
112+ htmlElements: [],
113113 };
114114 },
115115 mounted () {
@@ -121,7 +121,7 @@ export default {
121121 }
122122 }
123123 });
124- window .addEventListener (" keyup" , event => {
124+ window .addEventListener (" keyup" , ( event ) => {
125125 if (event .key === " Delete" ) {
126126 if (this .activeComponent ) {
127127 this .$store .dispatch (" deleteActiveComponent" );
@@ -136,7 +136,7 @@ export default {
136136 this .$store .dispatch (" copyActiveComponent" );
137137 }
138138 });
139- window .addEventListener (' paste' , () => {
139+ window .addEventListener (" paste" , () => {
140140 this .$store .dispatch (" pasteActiveComponent" );
141141 // console.log('pasted');
142142 });
@@ -169,7 +169,7 @@ export default {
169169 const checkParents = (component , lineage = [component .componentName ]) => {
170170 if (! Object .keys (component .parent ).length ) return lineage;
171171 for (var parents in component .parent ) {
172- // Mutating?
172+ // Mutating?
173173 lineage .push (parents);
174174 checkParents (component .parent [parents], lineage);
175175 }
@@ -217,7 +217,7 @@ export default {
217217 if (this .$refs .boxes ) {
218218 this .$refs .boxes .forEach ((element ) => {
219219 element .enabled = false ;
220-
220+
221221 element .$emit (" deactivated" );
222222 element .$emit (" update:active" , false );
223223 // this.$emit("deactivated");
@@ -291,7 +291,7 @@ export default {
291291 this .updateComponentSize (payload);
292292 }
293293 },
294- finishedDrag : function (x , y ) {
294+ finishedDrag : function (x , y ) {
295295 // console.log('FINISHED DRAGGING')
296296 let payload = {
297297 x: x,
@@ -334,12 +334,12 @@ export default {
334334 */
335335 // unhighlights all inactive components
336336 onActivated (componentData ) {
337- console .log (' This is ACTIVATED' )
337+ console .log (" This is ACTIVATED" );
338338 // console.log('onActivated - comp display, componentData', componentData)
339339 if (this .$refs .boxes ) {
340340 this .$refs .boxes .forEach ((element ) => {
341341 if (element .$attrs .id !== componentData .componentName ) {
342- console .log (' Emit' )
342+ console .log (" Emit" );
343343 element .enabled = false ;
344344 element .$emit (" deactivated" );
345345 element .$emit (" update:active" , false );
@@ -355,7 +355,7 @@ export default {
355355 },
356356 // deactivated is emitted before activated
357357 onDeactivated (type ) {
358- console .log (' This is DEACTIVATED' )
358+ console .log (" This is DEACTIVATED" );
359359 if (this .activeComponent !== " " ) {
360360 this .activeComponentData .isActive = false ;
361361 }
@@ -393,18 +393,18 @@ export default {
393393 // event handler for copying (ctrl+C)
394394 copyActiveComponent () {
395395 // console.log('copied');
396- }
396+ },
397397 },
398398 watch: {
399399 activeComponent : function () {
400400 if (this .activeComponent ) {
401401 this .onActivated (this .activeComponentObj );
402402 } else {
403- this .onDeactivated (' bgClick' );
403+ this .onDeactivated (" bgClick" );
404404 }
405- }
406- }
407- }
405+ },
406+ },
407+ };
408408 </script >
409409
410410<style scoped>
@@ -499,4 +499,4 @@ export default {
499499#counter {
500500 margin-top : 20px ;
501501}
502- </style >
502+ </style >
0 commit comments