Skip to content

Commit 5a957b2

Browse files
committed
UI: TileInfo uses dialog, improved styling
1 parent de92031 commit 5a957b2

File tree

4 files changed

+93
-70
lines changed

4 files changed

+93
-70
lines changed

.idea/workspace.xml

Lines changed: 33 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vue-client/src/components/panels/TileInfo.vue

Lines changed: 58 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,52 @@
1-
<template>
1+
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
22
<v-card
33
elevation-15
44
>
5-
<back-button></back-button>
6-
<v-card-title primary-title>
7-
Tile Information
8-
</v-card-title>
9-
<v-container>
5+
<v-layout row>
6+
<back-button></back-button>
7+
<v-card-title primary-title>
8+
Tile Information
9+
</v-card-title>
10+
11+
</v-layout>
12+
<v-container py-1>
1013
<v-layout
1114
column
1215
>
13-
<v-select
14-
v-model="section"
15-
:items="sections"
16-
attach
17-
chips
18-
label="Section"
19-
></v-select>
20-
<v-select
21-
v-model="comp"
22-
:items="comps"
23-
attach
24-
chips
25-
label="Component"
26-
></v-select>
27-
<v-btn @click="setDeps">Choose</v-btn>
16+
<v-dialog v-model="dialog">
17+
<template v-slot:activator="{ on }">
18+
<v-btn
19+
color="red lighten-2"
20+
dark
21+
v-on="on"
22+
>
23+
Add
24+
</v-btn>
25+
</template>
26+
<v-card @keypress.enter="setDeps">
27+
<v-container>
28+
<v-select
29+
v-model="section"
30+
:items="sections"
31+
attach
32+
chips
33+
label="Section"
34+
></v-select>
35+
<v-select
36+
v-model="comp"
37+
:items="comps"
38+
attach
39+
chips
40+
label="Component"
41+
></v-select>
42+
<v-layout row>
43+
<v-btn @click="setDeps">Choose</v-btn>
44+
<v-btn @click="dialog = false; section = ''; comp = ''">cancel</v-btn>
45+
</v-layout>
46+
</v-container>
47+
</v-card>
48+
</v-dialog>
49+
2850
<v-list>
2951
<v-list-tile>
3052
{{mesh.h[triClicked]}}
@@ -52,7 +74,8 @@
5274
return {
5375
section: '',
5476
comp: '',
55-
deps: []
77+
deps: [],
78+
dialog: false,
5679
}
5780
},
5881
components: {
@@ -75,34 +98,35 @@
7598
},
7699
77100
data() {
78-
console.log("in computed data ", this.deps)
101+
// console.log("in computed data ", this.deps)
79102
let d = this.deps.map(({section, comp}) => this.$store.state[section][comp])
80-
console.log("data: ", d)
103+
// console.log("data: ", d)
81104
return d
82105
},
83106
display() {
84-
console.log("in display")
85-
return this.data.map(d => {
107+
// console.log("in display")
108+
return this.data.map((d,i) => {
86109
console.log(d)
87110
if (Array.isArray(d)) {
88-
return d[this.triClicked]
111+
return (this.deps[i].comp) + ": \n " + d[this.triClicked]
89112
} else {
90-
return Object.keys(d).map(k => {
91-
return Array.isArray(d[k]) ? d[k][this.triClicked] : 'not array'
92-
});
113+
const a = Object.keys(d).map(k => {
114+
return (Array.isArray(d[k]) ? d[k][this.triClicked] : 'not array')
115+
})
116+
return (this.deps[i].comp) + ": \n " + a;
93117
}
94118
});
95119
},
96120
},
97121
methods: {
98122
setDeps() {
99-
console.log(this.section, this.comp)
123+
// console.log(this.section, this.comp)
100124
let newDeps = {section: this.section, comp: this.comp}
101-
console.log(newDeps)
125+
// console.log(newDeps)
102126
103127
this.deps.push(newDeps)
104-
console.log(this.deps)
105-
128+
// console.log(this.deps)
129+
this.dialog = false
106130
this.section = ''
107131
this.comp = ''
108132
}

vue-client/src/map_gen/map_gen.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vue-client/src/map_gen/map_gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function getER(): MapData {
8383
export default async function () {
8484

8585
console.log("hi from before setup")
86-
mesh = await setup(100, 100, 1.7)
86+
mesh = await setup(100, 100, 0.7)
8787
// const {points, triangles, halfedges} = mesh
8888

8989
h = await genHM(mesh)

0 commit comments

Comments
 (0)