|
5 | 5 | v-for="componentData in activeRouteArray"
|
6 | 6 | :key="componentData.componentName"
|
7 | 7 | :x="componentData.x"
|
8 |
| - :y="componentData.y" |
| 8 | + :y="componentData.y + 20" |
9 | 9 | :w="componentData.w"
|
10 | 10 | :h="componentData.h"
|
11 | 11 | :parent="true"
|
|
15 | 15 | @resizing="onResize"
|
16 | 16 | @dblclick.native="onDoubleClick(componentData)"
|
17 | 17 | >
|
18 |
| - <h3>{{ componentData.componentName }}</h3> |
| 18 | + <div class="component-title"> |
| 19 | + <p>{{ componentData.componentName }}</p> |
| 20 | + </div> |
| 21 | + <div class="component-children"> |
| 22 | + <p># of children: {{ componentMap[componentData.componentName].children.length }} </p> |
| 23 | + <p>children: {{ componentMap[componentData.componentName].children }}</p> |
| 24 | + <!-- <p v-for="child in childList" :key="childList.indexOf(child)"> {{ child.text }}</p> --> |
| 25 | + </div> |
19 | 26 | <q-menu context-menu>
|
20 | 27 | <q-list>
|
21 | 28 | <q-item clickable v-ripple v-close-popup @click="handleAddChild">
|
@@ -80,16 +87,18 @@ export default {
|
80 | 87 | ...mapState(['routes', 'activeRoute', 'activeComponent', 'componentMap', 'componentChildrenMultiselectValue']),
|
81 | 88 | // used in VueDraggableResizeable component
|
82 | 89 | activeRouteArray () {
|
83 |
| - // console.log('active route array method', this.routes[this.activeRoute]) |
| 90 | + console.log('active route array method', this.routes[this.activeRoute]) |
84 | 91 | return this.routes[this.activeRoute]
|
85 | 92 | },
|
86 | 93 | // used to delete components
|
87 | 94 | activeComponentData () {
|
88 |
| - // find out what this does |
89 | 95 | return this.activeRouteArray.filter(componentData => {
|
90 | 96 | return componentData.componentName === this.activeComponent
|
91 | 97 | })[0]
|
92 | 98 | },
|
| 99 | + childList () { |
| 100 | + return this.componentMap[componentData.componentName].children |
| 101 | + }, |
93 | 102 | options () {
|
94 | 103 | // PROBLEM: the objects on childrenmultiselectvalue are applied
|
95 | 104 | const routes = Object.keys(this.routes)
|
@@ -153,6 +162,24 @@ export default {
|
153 | 162 | </script>
|
154 | 163 |
|
155 | 164 | <style scoped>
|
| 165 | +.component-title { |
| 166 | + position: relative; |
| 167 | + font-size: 16px; |
| 168 | + top: -18px; |
| 169 | + left: 2px; |
| 170 | + color: black; |
| 171 | + font-weight: 800; |
| 172 | + /* background: rgba(0, 0, 0, 0.678); */ |
| 173 | + /* width: 1rem; */ |
| 174 | + line-height: 1.2; |
| 175 | + /* margin: 10px; */ |
| 176 | +} |
| 177 | +.component-children { |
| 178 | + position: absolute; |
| 179 | + top: 0rem; |
| 180 | + left: 2px; |
| 181 | + color: black; |
| 182 | +} |
156 | 183 | .component-display {
|
157 | 184 | /* border: 3px dashed rgb(159, 122, 122); */
|
158 | 185 | /* height: 500px; */
|
@@ -187,13 +214,16 @@ export default {
|
187 | 214 | #269;
|
188 | 215 | behavior: url(/pie/PIE.htc);
|
189 | 216 | }
|
190 |
| -
|
191 | 217 | .component-box {
|
192 | 218 | color: white;
|
193 | 219 | border: 1px dashed rgb(227, 203, 71);
|
194 | 220 | background-color: rgba(186, 99, 99, 0.529);
|
| 221 | + -webkit-transition: background-color 200ms linear; |
| 222 | + -ms-transition: background-color 200ms linear; |
| 223 | + transition: background-color 200ms linear; |
195 | 224 | }
|
196 | 225 | .active {
|
197 | 226 | background-color: rgba(57, 63, 84, 0.5);
|
| 227 | + border: 1px dashed rgb(227, 203, 71); |
198 | 228 | }
|
199 | 229 | </style>
|
0 commit comments