Skip to content

Commit 7d582c7

Browse files
authored
Merge pull request #14 from dnohashi/tree
Selected Component changes color on ComponentDisplay and Tree text is…
2 parents 32b4b04 + b868e69 commit 7d582c7

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

src/components/ComponentDisplay.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ export default {
124124
125125
.component-box {
126126
color: white;
127-
border: 3px dashed rgb(227, 203, 71);
127+
border: 1px dashed rgb(227, 203, 71);
128128
background-color: rgba(186, 99, 99, 0.529);
129129
}
130+
131+
.active {
132+
background-color: rgba(57, 63, 84, 0.5);
133+
}
130134
</style>

src/components/Tree.vue

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export default {
3434
},
3535
methods: {
3636
formatComponentMap (compMap) {
37-
console.log('\n Map : ', compMap, '\n')
3837
let result = []
3938
Object.values(compMap).forEach(compData => {
4039
result.push({
@@ -49,29 +48,16 @@ export default {
4948
const nodes = {}
5049
const formattedData = this.formatComponentMap(data)
5150
52-
// console.log('\n >>>> Formatted data <<<<');
53-
// console.log('FormattedData: ', formattedData, '\n');
54-
55-
// console.log('\n >>>> TRANSFORM TO TREE <<<< \n');
56-
5751
formattedData.forEach(component => {
5852
if (!nodes[component.name]) {
5953
nodes[component.name] = { name: component.name, children: [] }
6054
result = nodes
6155
}
62-
// console.log('CURRENT COMPONENT: ', component.name);
6356
component.children.forEach(child => {
64-
// if(typeof child === 'object') child = child.componentName;
6557
nodes[child] = { name: child, children: [] }
6658
nodes[component.name].children.push(nodes[child])
67-
// console.log('Adding child: ', typeof child, child);
68-
// console.log('\n');
6959
})
7060
})
71-
72-
console.log('\n >>>> RESULTS <<<< ')
73-
console.log(result)
74-
console.log('\n >>>> ______ <<<<')
7561
return result
7662
},
7763
@@ -96,7 +82,7 @@ export default {
9682
cursor: pointer;
9783
text-shadow: none !important;
9884
font-weight: bold;
99-
85+
fill: #FFF;
10086
/* none of these classes work
10187
color: white !important;
10288
background: white;

0 commit comments

Comments
 (0)