8888 @click =" submitLeft(leftText, this.activeHTML)" >
8989 </i >
9090 </q-input >
91+
92+ <q-item id =" layer-item" filled dark autofocus true hide-bottom-space color =" secondary" >
93+ <q-item-section v-model =" z" class =" layer" >Component Layer = {{z}}</q-item-section >
94+ <q-btn
95+ class =" minorAction"
96+ color =" transparent"
97+ text-color =" primary"
98+ label =" &ndash ; "
99+ @click =" (e) => handleLayer(e)"
100+ />
101+ <p id =" counter" >{{ z }}</p >
102+ <q-btn
103+ class =" minorAction"
104+ color =" transparent"
105+ text-color =" primary"
106+ label =" +"
107+ @click =" (e) => handleLayer(e)"
108+ />
109+ </q-item >
110+
111+
112+
91113 <q-btn label =" Close" @click =" this.openAttributeModal" />
92114 </q-form >
93115 </div >
@@ -105,6 +127,7 @@ export default {
105127 widthText: ' 0' ,
106128 topText: ' 0' ,
107129 leftText: ' 0' ,
130+ z: ' 0' ,
108131 }
109132 },
110133 computed: {
@@ -115,7 +138,11 @@ export default {
115138 ' activeComponent' ,
116139 ' activeHTML' ,
117140 ' activeLayer' ,
118- ' attributeModalOpen'
141+ ' attributeModalOpen' ,
142+ ' activeRoute' ,
143+ ' routes' ,
144+ ' activeComponentData' ,
145+ ' activeComponentObj' ,
119146 ])
120147 },
121148 components: {
@@ -130,6 +157,7 @@ export default {
130157 ' addActiveComponentWidth' ,
131158 ' addActiveComponentTop' ,
132159 ' addActiveComponentLeft' ,
160+ ' updateHTMLLayer' ,
133161 ]),
134162 submitClass (element , idNum ) {
135163 if (element === ' ' ) {
@@ -187,13 +215,43 @@ export default {
187215 this .leftText = ' ' ;
188216 },
189217
218+ handleLayer (e ) {
219+ e .preventDefault ();
220+
221+ let htmlZ;
222+
223+ this .activeComponentObj .htmlList .forEach ( element => {
224+ if (element .id === this .activeHTML ) {
225+ htmlZ = element .z ;
226+ }
227+ })
228+
229+ const payload = {
230+ activeHTML: this .activeHTML ,
231+ z: htmlZ,
232+ };
233+
234+ if (e .target .innerText === " +" ) {
235+ payload .z ++ ;
236+ this .z ++ ;
237+ }
238+ if (e .target .innerText === " –" && payload .z > 0 ) {
239+ payload .z -- ;
240+ this .z -- ;
241+ }
242+ this .updateHTMLLayer (payload);
243+ console .log (' here' )
244+ console .log (this .activeHTML )
190245 },
246+
191247 watch: {
192248 attributeModalOpen () {
193249 this .attributeModal = this .attributeModalOpen ;
194250 },
195251 }
196252}
253+
254+ }
197255 </script >
198256
199257<style lang="scss">
@@ -212,4 +270,14 @@ export default {
212270.title {
213271 font-size : 1.3em
214272}
273+
274+ .minorAction {
275+ margin-right :5px ;
276+ margin-left : 5px ;
277+ width :2em ;
278+ height : 1.5em ;
279+ }
280+ #counter {
281+ padding-top :5px ;
282+ }
215283 </style >
0 commit comments