11<template >
22 <div class =" component-display" >
3- <context-menu ref =" component-options" >
4- <context-menu-item :action =" handleAddChild" >Add a Child</context-menu-item >
3+ <!-- < context-menu ref="component-options">
4+ <context-menu-item :action="handleAddChild"><button> Add a Child</button> </context-menu-item>
55 <context-menu-item><button>Delete a Child</button></context-menu-item>
6- </context-menu >
6+ </context-menu> -->
77 <VueDraggableResizable
88 class-name =" component-box"
99 v-for =" componentData in activeRouteArray"
2121 v-context-menu =" 'component-options'"
2222 >
2323 <h3 >{{ componentData.componentName }}</h3 >
24+ <q-menu context-menu >
25+ <q-list >
26+ <q-item clickable v-ripple @click =" handleAddChild" >
27+ <q-item-section >Add Children</q-item-section >
28+ <q-item-section avatar ><q-icon color =" primary" name =" add" /></q-item-section >
29+ </q-item >
30+ <q-item clickable v-ripple >
31+ <q-item-section >Delete Children</q-item-section >
32+ <q-item-section avatar ><q-icon color =" primary" name =" delete" /></q-item-section >
33+ </q-item >
34+ </q-list >
35+ </q-menu >
2436 </VueDraggableResizable >
25- <q-dialog v-model =" modalOpen" >
37+ <q-dialog id = " select-child-modal " v-model =" modalOpen" >
2638 <ChildrenMultiselect />
2739 </q-dialog >
2840 </div >
3143import { mapState , mapActions } from ' vuex'
3244import VueDraggableResizable from ' vue-draggable-resizable'
3345import ChildrenMultiselect from ' ../components/ChildrenMultiselect'
46+ import ' vue-draggable-resizable/dist/VueDraggableResizable.css'
3447
3548export default {
3649 name: ' ComponentDisplay' ,
@@ -58,6 +71,7 @@ export default {
5871 ... mapState ([' routes' , ' activeRoute' , ' activeComponent' , ' componentMap' ]),
5972 // used in VueDraggableResizeable component
6073 activeRouteArray () {
74+ // console.log('active route array method', this.routes[this.activeRoute])
6175 return this .routes [this .activeRoute ]
6276 },
6377 // used to delete components
@@ -69,7 +83,7 @@ export default {
6983 }
7084 },
7185 methods: {
72- ... mapActions ([' setActiveComponent' , ' updateOpenModal ' ]),
86+ ... mapActions ([' setActiveComponent' ]),
7387 onResize : function (x , y , width , height ) {
7488 this .activeComponentData .x = x
7589 this .activeComponentData .y = y
@@ -95,21 +109,57 @@ export default {
95109 // render modal with childrenmultiselect in it
96110 this .modalOpen = true
97111 }
112+ // @dblclick.native="onDoubleClick(componentData)"
113+ // onDoubleClick (compData) {
114+ // this.setActiveComponent(compData.componentName)
115+ // this.activeComponentData.isActive = true
116+ // }
98117 }
99118}
100119 </script >
101120
102121<style scoped>
103122.component-display {
104- border : 2px dotted rgb (14 , 14 , 14 );
105- background-color : rgba (242 , 234 , 228 , 0.61 );
106- height : 70vh ;
107- width : 70vw ;
123+ /* border: 3px dashed rgb(159, 122, 122); */
124+ /* height: 500px; */
125+ /* width: 500px; */
126+ /* original is 70vh */
127+ height : 87vh ;
128+ width : 100vw ;
108129 position : relative ;
130+ background-color : rgba (124 , 126 , 145 , 0.44 );
131+ /* background-color: #269; */
132+ background-size : 100px 100px , 100px 100px , 20px 20px , 20px 20px ;
133+ background-position : -2px -2px , -2px -2px , -1px -1px , -1px -1px ;
134+ background-image : -webkit-linear-gradient (white 2px , transparent 2px ),
135+ -webkit-linear-gradient (0 , white 2px , transparent 2px ),
136+ -webkit-linear-gradient (rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ),
137+ -webkit-linear-gradient (0 , rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px );
138+ background-image : -moz-linear-gradient (white 2px , transparent 2px ),
139+ -moz-linear-gradient (0 , white 2px , transparent 2px ),
140+ -moz-linear-gradient (rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ),
141+ -moz-linear-gradient (0 , rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px );
142+ background-image : linear-gradient (white 2px , transparent 2px ),
143+ linear-gradient (90deg , white 2px , transparent 2px ),
144+ linear-gradient (rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ),
145+ linear-gradient (90deg , rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px );
146+ -pie-background : linear-gradient (white 2px , transparent 2px ) -2px -2px / 100px ,
147+ linear-gradient (90deg , white 2px , transparent 2px ) -2px -2px / 100px ,
148+ linear-gradient (rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ) -1px -1px /
149+ 20px ,
150+ linear-gradient (90deg , rgba (255 , 255 , 255 , 0.3 ) 1px , transparent 1px ) -1px -1px /
151+ 20px ,
152+ #269 ;
153+ behavior : url (/pie/PIE.htc );
109154}
110155
111156.component-box {
112157 color : white ;
113- border : 1px solid salmon ;
158+ border : 3px dashed rgb (227 , 203 , 71 );
159+ background-color : rgba (186 , 99 , 99 , 0.529 );
160+ }
161+
162+ .select-child-modal {
163+ background-color : red ;
114164}
115165 </style >
0 commit comments