Skip to content

Commit babec97

Browse files
authored
Merge pull request #34 from jeisele2/master
Tree rerender, styling
2 parents 30a80d3 + 40951ee commit babec97

File tree

4 files changed

+17
-26
lines changed

4 files changed

+17
-26
lines changed

src/components/CodeSnippet.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,7 @@ export default {
124124
.code-editor {
125125
font-size: 11px;
126126
}
127+
::-webkit-scrollbar {
128+
display: none;
129+
}
127130
</style>

src/components/Tree.vue

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="container">
33
<tree
4-
:data="tree"
4+
:data="computedTree"
55
node-text="name"
66
layoutType="euclidean"
77
type="tree"
@@ -21,10 +21,8 @@ export default {
2121
},
2222
computed: {
2323
...mapState(['componentMap']),
24-
componentMap: {
25-
get () {
26-
return this.$store.state.componentMap
27-
}
24+
computedTree () {
25+
return this.buildTree()
2826
}
2927
},
3028
data () {
@@ -34,6 +32,7 @@ export default {
3432
},
3533
methods: {
3634
formatComponentMap (compMap) {
35+
console.log('compMap', compMap)
3736
let result = []
3837
Object.values(compMap).forEach(compData => {
3938
result.push({
@@ -62,15 +61,13 @@ export default {
6261
},
6362
buildTree () {
6463
let build = this.transformToTree(this.componentMap)
65-
this.tree = build['App']
64+
return build['App']
6665
}
67-
},
68-
created () {
69-
this.buildTree()
7066
}
7167
}
7268
</script>
73-
<style>
69+
70+
<style lang="stylus">
7471
.container {
7572
height: 100%;
7673
width: 100%;
@@ -89,12 +86,12 @@ export default {
8986
}
9087
/* changes the circle node color */
9188
.treeclass .nodetree circle {
92-
fill: rgb(232, 225, 16);
89+
fill: #A2D9FF;
9390
}
9491
/* changes the stroke color */
9592
.treeclass .linktree {
96-
stroke: rgb(232, 225, 16) !important;
97-
stroke-opacity: .4;
98-
stroke-width: 2px;
93+
stroke: $secondary !important;
94+
stroke-opacity: 1;
95+
stroke-width: 8px;
9996
}
10097
</style>

src/css/quasar.variables.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Tip: Use the "Theme Builder" on Quasar's documentation website.
1111

1212
$primary = #737578
13-
$secondary = #00FFFF
13+
$secondary = #2D95CD
1414
$accent = #9C27B0
1515
$subaccent = #454d66
1616
$subaccentbtn = #2c384d

src/layouts/MyLayout.vue

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,7 @@ export default {
7979
// background: white;
8080
background: #272822;
8181
}
82-
body::-webkit-scrollbar {
83-
width: 1em;
84-
}
85-
86-
body::-webkit-scrollbar-track {
87-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
88-
}
89-
90-
body::-webkit-scrollbar-thumb {
91-
background-color: darkgrey;
92-
outline: 1px solid slategrey;
82+
::-webkit-scrollbar {
83+
display: none;
9384
}
9485
</style>

0 commit comments

Comments
 (0)