@@ -91,7 +91,7 @@ export default {
91
91
testOptions: [" parent" , " child" , " grandchild" ],
92
92
testModel: [],
93
93
mockImg: false ,
94
- counter: 0 ,
94
+ // counter: 6 ,
95
95
initialPosition: {x: 0 , y: 0 ,},
96
96
initialSize: {w: 0 ,h: 0 ,},
97
97
};
@@ -119,7 +119,7 @@ export default {
119
119
]),
120
120
// used in VueDraggableResizeable component
121
121
activeRouteArray () {
122
- // console.log("active route array method", this.routes[this.activeRoute]);
122
+ console .log (" active route array method" , this .routes [this .activeRoute ]);
123
123
return this .routes [this .activeRoute ];
124
124
},
125
125
// used to delete components
@@ -223,6 +223,7 @@ export default {
223
223
" updateActiveComponentChildrenValue" ,
224
224
" updateComponentPosition" ,
225
225
" updateStartingPosition" ,
226
+ " updateComponentLayer" ,
226
227
" updateStartingSize" ,
227
228
" updateComponentSize" ,
228
229
]),
@@ -310,11 +311,6 @@ export default {
310
311
this .componentMap [this .activeComponent ].y = y;
311
312
this .userImage ;
312
313
},
313
- // onLayer: function(z) {
314
- // this.activeComponentData.z = z;
315
- // // Want to change the "Z" of the component found in Routes[activeRoute][whatever the component is]
316
- // //have to do this via an action or it won't be preserved in our undo/redo
317
- // },
318
314
319
315
finishedDrag : function (x ,y ){
320
316
console .log (" FINISHED DRAGGING" )
@@ -389,6 +385,7 @@ export default {
389
385
},
390
386
handleLayer (e ) {
391
387
e .preventDefault ()
388
+ <<<<<< < HEAD
392
389
console .log (' event object' , e .target .innerText )
393
390
console .log (' Layer handled' )
394
391
@@ -398,23 +395,35 @@ export default {
398
395
}
399
396
if (e .target .innerText === ' -' && this .counter > 0 ) {
400
397
this .counter -- ;
398
+ ====== =
399
+ const payload = {
400
+ activeComponent: this .activeComponent ,
401
+ routeArray: this .routes [this .activeRoute ],
402
+ activeComponentData: this .activeComponentData ,
403
+ z: this .activeComponentData .z ,
404
+ >>>>>> > master
401
405
}
402
- console .log (' counter' , this .counter )
403
- this .activeComponentData .z = this .counter ;
404
- this .componentMap [this .activeComponent ].z = this .counter ;
405
-
406
+ if (e .target .innerText === ' +' ) payload .z ++ ;
407
+ if (e .target .innerText === ' -' && payload .z > 0 ) payload .z -- ;
408
+ this .updateComponentLayer (payload)
406
409
},
407
410
// @dblclick.native="onDoubleClick(componentData)"
408
411
// onDoubleClick (compData) {
409
412
// this.setActiveComponent(compData.componentName)
410
413
// this.activeComponentData.isActive = true
411
414
// }
415
+ <<<<<< < HEAD
412
416
handleClick (event ) {
413
417
if (event .target .className === " component-display grid-bg" )
414
418
{
415
419
if (! (' ' === this .activeComponent )){
416
420
this .setActiveComponent (' ' );
417
421
}
422
+ ====== =
423
+ handleClick (event ){
424
+ if (event .target .className === " component-display grid-bg" ) {
425
+ if (! (' ' === this .activeComponent )) this .setActiveComponent (' ' );
426
+ >>>>>> > master
418
427
}
419
428
}
420
429
}
0 commit comments