Skip to content

Commit 183a2d4

Browse files
Dean OhashiDean Ohashi
authored andcommitted
commit
2 parents 59cb82b + eb8050a commit 183a2d4

File tree

9 files changed

+436
-26
lines changed

9 files changed

+436
-26
lines changed

quasar.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ module.exports = function (ctx) {
8686
// analyze: true,
8787
// extractCSS: false,
8888
extendWebpack (cfg) {
89-
// cfg.module.rules.push({
89+
cfg.module.rules.push({
9090
// enforce: 'pre',
9191
// test: /\.(js|vue)$/,
9292
// loader: 'eslint-loader',
9393
// exclude: /node_modules/,
9494
// options: {
9595
// formatter: require('eslint').CLIEngine.getFormatter('stylish')
9696
// }
97-
// })
97+
})
9898
}
9999
},
100100

src/components/CodeSnippet.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
language="js"
88
:line-numbers="lineNumbers"
99
class="code-editor"
10-
:style="{ height: `${height}vh` }"
10+
:style="{ height: `${height}vh`}"
11+
readonly="true"
1112
/>
1213
</div>
1314
</template>
@@ -121,5 +122,6 @@ export default {
121122
<style lang="stylus" scoped>
122123
// resize handled by vue lifecycle methods
123124
.code-editor {
125+
font-size: 11px;
124126
}
125127
</style>

src/components/ComponentDisplay.vue

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
v-for="componentData in activeRouteArray"
66
:key="componentData.componentName"
77
:x="componentData.x"
8-
:y="componentData.y"
8+
:y="componentData.y + 20"
99
:w="componentData.w"
1010
:h="componentData.h"
1111
:parent="true"
@@ -15,7 +15,14 @@
1515
@resizing="onResize"
1616
@dblclick.native="onDoubleClick(componentData)"
1717
>
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>
1926
<q-menu context-menu>
2027
<q-list>
2128
<q-item clickable v-ripple v-close-popup @click="handleAddChild">
@@ -80,16 +87,18 @@ export default {
8087
...mapState(['routes', 'activeRoute', 'activeComponent', 'componentMap', 'componentChildrenMultiselectValue']),
8188
// used in VueDraggableResizeable component
8289
activeRouteArray () {
83-
// console.log('active route array method', this.routes[this.activeRoute])
90+
console.log('active route array method', this.routes[this.activeRoute])
8491
return this.routes[this.activeRoute]
8592
},
8693
// used to delete components
8794
activeComponentData () {
88-
// find out what this does
8995
return this.activeRouteArray.filter(componentData => {
9096
return componentData.componentName === this.activeComponent
9197
})[0]
9298
},
99+
childList () {
100+
return this.componentMap[componentData.componentName].children
101+
},
93102
options () {
94103
// PROBLEM: the objects on childrenmultiselectvalue are applied
95104
const routes = Object.keys(this.routes)
@@ -153,6 +162,24 @@ export default {
153162
</script>
154163

155164
<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+
}
156183
.component-display {
157184
/* border: 3px dashed rgb(159, 122, 122); */
158185
/* height: 500px; */
@@ -187,13 +214,16 @@ export default {
187214
#269;
188215
behavior: url(/pie/PIE.htc);
189216
}
190-
191217
.component-box {
192218
color: white;
193219
border: 1px dashed rgb(227, 203, 71);
194220
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;
195224
}
196225
.active {
197226
background-color: rgba(57, 63, 84, 0.5);
227+
border: 1px dashed rgb(227, 203, 71);
198228
}
199229
</style>

0 commit comments

Comments
 (0)