7
7
<template >
8
8
<!-- the background Canvas grid -->
9
9
<div class =" component-display grid-bg" :style =" mockBg" v-on:click =" handleClick" v-on:click.right =" handleRight" >
10
- <div class =" cssContainer" >
10
+ <div class =" cssContainer" :style = " { 'background-size': `${this.gridLayout[0]}px ${this.gridLayout[1]}px, ${this.gridLayout[0]}px ${this.gridLayout[1]}px` } " >
11
11
<!-- This is the actual component box -->
12
12
<!-- https://www.npmjs.com/package/vue-draggable-resizable -->
13
- <p class =" cssContainerText" >
14
- CSS Container</p >
15
-
13
+ <p class =" cssContainerText" > CSS Container {{ this.activeComponentObj }}</p >
16
14
<!-- each component box in canvas will have these properties-->
15
+ <!-- !For property :Grid - look into setting it as a store variable/ input variable - no dynamic :grid changing for props- need to implement -->
17
16
<vue-draggable-resizable
18
17
class-name =" component-box"
19
18
v-for =" componentData in activeRouteArray"
23
22
:x =" componentData.x"
24
23
:y =" componentData.y"
25
24
:z =" componentData.z"
26
- :w =" componentData.w"
27
- :h =" componentData.h"
25
+ :w =" 2 * this.gridLayout[0]"
26
+ :h =" 2 * this.gridLayout[1]"
27
+ :grid =" this.gridLayout"
28
28
:preventDeactivation =" true"
29
29
@activated =" onActivated(componentData)"
30
30
@deactivated =" onDeactivated(componentData)"
69
69
{'background-color': componentData.color}]"
70
70
>
71
71
<p class =" innerHtmlText" style =" font-size : 3em " >{{element.note !== '' ? element.note : element.text}}</p >
72
- </div >
72
+ </div >sss
73
73
<div v-if =" element.text === 'footer'" class =" htmlFooter" ></div >
74
74
<div v-if =" element.text === 'form'"
75
75
class =" htmlGeneral"
344
344
import { useExportComponent } from " ./composables/useExportComponent.js" ;
345
345
import { mapState , mapActions } from " vuex" ;
346
346
import VueDraggableResizable from " vue-draggable-resizable/src/components/vue-draggable-resizable.vue" ;
347
- import Vue3DraggableResizable from ' vue3-draggable-resizable'
347
+ // import Vue3DraggableResizable from 'vue3-draggable-resizable'
348
348
import VueMultiselect from " vue-multiselect" ;
349
349
import " vue-draggable-resizable/src/components/vue-draggable-resizable.css" ;
350
350
import ' vue3-draggable-resizable/dist/Vue3DraggableResizable.css'
@@ -357,7 +357,7 @@ const cloneDeep = require("lodash.clonedeep");
357
357
export default {
358
358
name: " Canvas" ,
359
359
components: {
360
- Vue3DraggableResizable,
360
+ // Vue3DraggableResizable,
361
361
VueDraggableResizable,
362
362
VueMultiselect,
363
363
ColorPicker,
@@ -406,7 +406,8 @@ export default {
406
406
' selectedElementList' ,
407
407
' activeLayer' ,
408
408
" colorModalOpen" ,
409
- " activeRouteDisplay"
409
+ " activeRouteDisplay" ,
410
+ " gridLayout" ,
410
411
]),
411
412
// used in VueDraggableResizeable component
412
413
activeRouteArray () {
@@ -503,6 +504,7 @@ export default {
503
504
" openNoteModal" ,
504
505
" openColorModal" ,
505
506
" updateColor" ,
507
+ " updateStateComponentPosition"
506
508
]),
507
509
useExportComponentBound () {
508
510
useExportComponent .bind (this )();
@@ -557,7 +559,6 @@ export default {
557
559
payload .h !== this .initialSize .h
558
560
) {
559
561
this .updateComponentSize (payload);
560
-
561
562
}
562
563
this .refresh ();
563
564
},
@@ -575,7 +576,7 @@ export default {
575
576
payload .z -- ;
576
577
this .updateComponentLayer (payload);
577
578
},
578
- // drag and drop function
579
+ // ! drag and drop function
579
580
finishedDrag : function (x , y ) {
580
581
let payload = {
581
582
x: x,
@@ -588,6 +589,7 @@ export default {
588
589
payload .x !== this .initialPosition .x ||
589
590
payload .y !== this .initialPosition .y
590
591
) {
592
+ // console.log(payload);
591
593
this .updateComponentPosition (payload);
592
594
}
593
595
this .wasDragged = true ;
@@ -874,6 +876,27 @@ li:hover {
874
876
border: 1px solid black;
875
877
width: 1000px ;
876
878
height: 900px ;
879
+ background- color: rgba (223 , 218 , 218 , 0.886 );
880
+ background- size: 100px 100px , 100px 100px , 20px 20px , 20px 20px ;
881
+ // background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
882
+ background- image: - webkit- linear- gradient (rgba (255 , 255 , 255 , 0.8 ) 1px , transparent 1px ),
883
+ - webkit- linear- gradient (0 , rgba (255 , 255 , 255 , 0.8 ) 1px , transparent 1px ),
884
+ - webkit- linear- gradient (rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ),
885
+ - webkit- linear- gradient (0 , rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px );
886
+ background- image: - moz- linear- gradient (rgba (255 , 255 , 255 , 0.8 ) 1px , transparent 1px ),
887
+ - moz- linear- gradient (0 , rgba (255 , 255 , 255 , 0.8 ) 1px , transparent 1px ),
888
+ - moz- linear- gradient (rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ),
889
+ - moz- linear- gradient (0 , rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px );
890
+ background- image: linear- gradient (rgba (255 , 255 , 255 , 0.8 ) 1px , transparent 1px ),
891
+ linear- gradient (90deg , rgba (255 , 255 , 255 , 0.8 ) 1px , transparent 1px ),
892
+ linear- gradient (rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ),
893
+ linear- gradient (90deg , rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px );
894
+ - pie- background: linear- gradient (rgba (255 , 255 , 255 , 0.8 ) 1px , transparent 1px ) - 2px - 2px / 100px ,
895
+ linear- gradient (90deg , rgba (255 , 255 , 255 , 0.8 ) 1px , transparent 1px ) - 2px - 2px / 100px ,
896
+ linear- gradient (rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ) - 1px - 1px / 20px ,
897
+ linear- gradient (90deg , rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ) - 1px - 1px / 20px ,
898
+ $secondary;
899
+ behavior: url (/ pie/ PIE .htc );
877
900
}
878
901
879
902
.cssContainerText {
0 commit comments