2
2
3
3
<template >
4
4
<div class =" AttributeBox" >
5
- <div class =" AttributeContainer" v-for =" element in componentMap.value [activeComponent.value ].htmlList"
5
+ <div class =" AttributeContainer" v-for =" element in componentMap[activeComponent].htmlList"
6
6
:key =" element.id + Date.now()" >
7
- <p v-if =" element.id === activeHTML.value " class =" title" >Your class {{ element.class.length !== 0 ? 'is ' + element.class : 'has not been stated yet' }}</p >
7
+ <p v-if =" element.id === activeHTML" class =" title" >Your class {{ element.class.length !== 0 ? 'is ' + element.class : 'has not been stated yet' }}</p >
8
8
</div >
9
9
<q-form autofocus v-on:submit.prevent =" submitClass" >
10
10
<q-input label =" Add/Change your class name" filled dark autofocus true hide-bottom-space v-model =" classText"
11
11
@keydown.enter =" submitClass" >
12
12
<i id =" comp-btn" class =" fa-solid fa-right-to-bracket"
13
- :disable =" classText.length > 0 ? false : true" @click.self =" submitClass(classText, activeHTML.value )" >
13
+ :disable =" classText.length > 0 ? false : true" @click.self =" submitClass(classText, activeHTML)" >
14
14
</i >
15
15
</q-input >
16
16
</q-form >
17
17
<q-form autofocus v-on:submit.prevent =" addBinding" >
18
18
<q-input label =" Add/Change two-way binding" filled dark autofocus true hide-bottom-space v-model =" bindingText"
19
- @keydown.enter =" addBinding(bindingText, activeHTML.value )" >
19
+ @keydown.enter =" addBinding(bindingText, activeHTML)" >
20
20
<i id =" compt-btn" class =" fa-solid fa-right-to-bracket" label =" Add Binding"
21
- :disable =" bindingText.length > 0 ? false : true" @click.self =" addBinding(bindingText, activeHTML.value )" >
21
+ :disable =" bindingText.length > 0 ? false : true" @click.self =" addBinding(bindingText, activeHTML)" >
22
22
</i >
23
23
</q-input >
24
24
</q-form >
25
- <div class =" AttributeContainer" v-for =" element in componentMap.value [activeComponent.value ].htmlList"
25
+ <div class =" AttributeContainer" v-for =" element in componentMap[activeComponent].htmlList"
26
26
:key =" element.id + Date.now()" >
27
- <div v-if =" exceptions.includes(element.text) && element.id === activeHTML.value " >
27
+ <div v-if =" exceptions.includes(element.text) && element.id === activeHTML" >
28
28
<q-form autofocus v-on:submit.prevent =" submitNote" >
29
29
<q-input label =" Add Inner Text" filled dark autofocus true hide-bottom-space v-model =" noteText" @keydown.enter =" submitNote" >
30
30
<i class =" fa-solid fa-right-to-bracket" color =" secondary" label =" Submit Note"
31
- :disable =" noteText.length > 0 ? false : true" @click.self =" submitNote(noteText, activeHTML.value )" >
31
+ :disable =" noteText.length > 0 ? false : true" @click.self =" submitNote(noteText, activeHTML)" >
32
32
</i >
33
33
</q-input >
34
34
</q-form >
44
44
:label-value =" 'Height:' + heightText"
45
45
inner-track-color =" primary"
46
46
color =" secondary"
47
- @change =" submitHeight(heightText, activeHTML.value )"
48
- @update:model-value =" submitHeight(heightText, activeHTML.value )"
47
+ @change =" submitHeight(heightText, activeHTML)"
48
+ @update:model-value =" submitHeight(heightText, activeHTML)"
49
49
style =" float : left ; margin-left : 5% "
50
50
/>
51
51
</q-form >
60
60
:label-value =" 'Elevation:' + topText"
61
61
inner-track-color =" primary"
62
62
color =" secondary"
63
- @change =" submitTop(topText, activeHTML.value )"
64
- @update:model-value =" submitTop(topText, activeHTML.value )"
63
+ @change =" submitTop(topText, activeHTML)"
64
+ @update:model-value =" submitTop(topText, activeHTML)"
65
65
style =" float : left ; margin-left : 35% "
66
66
/>
67
67
</q-form >
75
75
:label-value =" 'Width:' + widthText"
76
76
inner-track-color =" primary"
77
77
color =" secondary"
78
- @change =" submitWidth(widthText, activeHTML.value )"
79
- @update:model-value =" submitWidth(widthText, activeHTML.value )"
78
+ @change =" submitWidth(widthText, activeHTML)"
79
+ @update:model-value =" submitWidth(widthText, activeHTML)"
80
80
style =" margin-top : 20% "
81
81
/>
82
82
</q-form >
90
90
:label-value =" 'Position:' + leftText"
91
91
inner-track-color =" primary"
92
92
color =" secondary"
93
- @change =" submitLeft(leftText, activeHTML.value )"
94
- @update:model-value =" submitLeft(leftText, activeHTML.value )"
93
+ @change =" submitLeft(leftText, activeHTML)"
94
+ @update:model-value =" submitLeft(leftText, activeHTML)"
95
95
style =" margin-top : 20% "
96
96
/>
97
97
</q-form >
98
98
<q-form autofocus v-on:submit.prevent =" submitHeight" >
99
99
<q-input label =" Adjust height (0-100)" filled dark autofocus true hide-bottom-space v-model =" heightText" @keydown =" submitHeight" >
100
100
<i class =" fa-solid fa-right-to-bracket" color =" secondary" label =" Submit Height"
101
- @click.self =" submitHeight(heightText, activeHTML.value )" >
101
+ @click.self =" submitHeight(heightText, activeHTML)" >
102
102
</i >
103
103
</q-input >
104
104
</q-form >
105
105
<q-form autofocus v-on:submit.prevent =" submitWidth" >
106
106
<q-input label =" Adjust width (0-100)" filled dark autofocus true hide-bottom-space v-model =" widthText" @keydown.enter =" submitWidth" >
107
107
<i class =" fa-solid fa-right-to-bracket" color =" secondary" label =" Submit Width"
108
- @click.self =" submitWidth(widthText, activeHTML.value )" >
108
+ @click.self =" submitWidth(widthText, activeHTML)" >
109
109
</i >
110
110
</q-input >
111
111
</q-form >
112
112
<q-form autofocus v-on:submit.prevent =" submitTop" >
113
113
<q-input label =" Adjust Elevation (0-100)" filled dark autofocus true hide-bottom-space v-model =" topText" @keydown.enter =" submitTop" >
114
114
<i class =" fa-solid fa-right-to-bracket" color =" secondary" label =" Submit Height"
115
- @click.self =" submitTop(topText, activeHTML.value )" >
115
+ @click.self =" submitTop(topText, activeHTML)" >
116
116
</i >
117
117
</q-input >
118
118
</q-form >
119
119
<q-form autofocus v-on:submit.prevent =" submitLeft" >
120
120
<q-input label =" Adjust Distance (0-100)" filled dark autofocus true hide-bottom-space v-model =" leftText" @keydown.enter =" submitLeft" >
121
121
<i class =" fa-solid fa-right-to-bracket" color =" secondary" label =" Submit Position"
122
- @click =" submitLeft(leftText, activeHTML.value )" >
122
+ @click =" submitLeft(leftText, activeHTML)" >
123
123
</i >
124
124
</q-input >
125
125
</q-form >
133
133
@click =" (e) => handleLayer(e)"
134
134
/>
135
135
<!-- nested for loop to iterate to display current z-index for selected htmlElement -->
136
- <template v-for =" element in routes . value [activeRoute . value ]" >
136
+ <template v-for =" element in routes [activeRoute ]" >
137
137
<template v-for =" element1 in element .htmlList " >
138
- <p v-if =" element1.id === activeHTML.value " id =" counter" :key =" element1.id" >{{ element1.z }} </p >
138
+ <p v-if =" element1.id === activeHTML" id =" counter" :key =" element1.id" >{{ element1.z }} </p >
139
139
</template >
140
140
</template >
141
141
<q-btn
@@ -169,8 +169,10 @@ const leftText = ref('');
169
169
const z = ref (' 0' );
170
170
const noteText = ref (' ' );
171
171
const bindingText = ref (' ' );
172
+ const note = ref (' ' );
172
173
173
174
onMounted (() => {
175
+ console .log (" onMounted test" , widthText .value );
174
176
// for loop to access nested HTML elements of components - sets height/width/top/left sliders to current value of selected HTML element
175
177
for (let i = 0 ; i < routes .value [activeRoute .value ].length ; i++ ) {
176
178
for (let j = 0 ; j < routes .value [activeRoute .value ][i].htmlList .length ; j++ ) {
@@ -184,6 +186,8 @@ for (let i = 0; i <routes.value[activeRoute.value].length; i++) {
184
186
}
185
187
});
186
188
189
+ // computed
190
+
187
191
const selectedElementList = computed (() => store .state .selectedElementList );
188
192
const componentMap = computed (() => store .state .componentMap );
189
193
const activeComponent = computed (() => store .state .activeComponent );
@@ -234,7 +238,8 @@ const submitNote = (element, idNum) => {
234
238
id: idNum
235
239
}
236
240
addActiveComponentElementNote (payload);
237
- note .value = ' ' ;
241
+ console .log (" Ins" )
242
+ text .value = ' ' ;
238
243
};
239
244
240
245
const submitHeight = (element , idNum ) => {
@@ -327,7 +332,7 @@ const addBinding = (input, idNum) => {
327
332
id: idNum
328
333
}
329
334
addBindingText (payload);
330
- bindingText = ' ' ;
335
+ bindingText . value = ' ' ;
331
336
};
332
337
333
338
0 commit comments