Skip to content

Commit 9a96587

Browse files
committed
Improve save feature, add legend, change defect icons and fix bugs
1 parent fc955d7 commit 9a96587

File tree

12 files changed

+583
-465
lines changed

12 files changed

+583
-465
lines changed

dist/assets/canvas_placeholder.png

0 Bytes
Loading

dist/assets/images.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ convert -background 'rgba(240, 240, 240, 1.0)' -fill 'rgba(150, 150, 150, 0.8)'
33
convert -background 'rgba(240, 240, 240, 1.0)' -fill 'rgba(150, 150, 150, 0.8)' -size 800x600 -pointsize 36 -gravity center label:'Upload floor plan' canvas_placeholder.png
44

55
convert -size 100x100 xc:none \
6-
-fill red -stroke red -draw "circle 50,50 50,0" -fill 'rgba(250, 150, 0, 1)' \
7-
-draw "circle 50,50 40,10" structural.png
6+
-stroke green -strokewidth 10 -fill 'rgba(0, 200, 150, 1)' \
7+
-draw "circle 50,50 20,20" no_defect.png
88

99
convert -size 100x100 xc:none \
10-
-fill green -stroke green -draw "circle 50,50 50,0" -fill 'rgba(0, 200, 150, 1)' \
11-
-draw "circle 50,50 40,10" no_defect.png
10+
-stroke orange -strokewidth 10 -fill 'rgba(250, 250, 50, 1)' \
11+
-draw "circle 50,50 20,20" non-structural.png
1212

1313
convert -size 100x100 xc:none \
14-
-fill orange -stroke orange -draw "circle 50,50 50,0" -fill 'yellow' \
15-
-draw "circle 50,50 40,10" non-structural.png
16-
14+
-stroke red -strokewidth 10 -fill 'rgba(250, 150, 0, 1)' \
15+
-draw "circle 50,50 20,20" structural.png

dist/assets/no_defect.png

-1.61 KB
Loading

dist/assets/non-structural.png

-44 Bytes
Loading

dist/assets/placeholder.png

0 Bytes
Loading

dist/assets/structural.png

-1.47 KB
Loading

dist/index.html

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -123,40 +123,48 @@
123123
</div>
124124

125125
</div>
126+
<div v-if='(index+1) % 8 === 0' class='defect-legend'>
127+
<span><img src='./assets/no_defect.png' width='32px'> No defect</span>
128+
<span><img src='./assets/non-structural.png' width='32px'> Non-structural defect</span>
129+
<span><img src='./assets/structural.png' width='32px'> Structural defect</span>
130+
</div>
126131
<div v-if='(index+1) % 8 === 0' class="html2pdf__page-break"></div>
127132
</template>
128133
</div>
129134
</div>
130135
</div>
131136

132137
<div class = 'page-3' v-show='seen === 2'>
133-
<img width='400px' height='300px'
134-
v-bind:src='save_preview_src'
135-
>
136-
<ul>
137-
<li>
138-
Building: {{building}}
139-
<input v-model='building'>
140-
</li>
141-
<li>
142-
Floor: {{floor}}
143-
<input v-model='floor'>
144-
</li>
145-
</ul>
146-
<table>
147-
<th> Save name </th>
148-
<th> Save </th>
149-
<th> Load save </th>
150-
<tr v-for='(save, index) in saves'>
151-
<td v-on:click='handle_save_click(save)'> {{save}}
152-
<td> <button v-on:click='save_data(save)'>Save</button>
153-
<td> <button v-on:click='load_data(save)'>Load</button>
154-
</tr>
155-
</table>
156-
157-
<button v-on:click='update_saves()'> Refresh </button>
158-
<button v-on:click='save_data()'> Save </button>
159-
<button v-on:click='clear_dbs()'> Delete all saves </button>
138+
<div class = 'page-3-wrapper'>
139+
<img width='400px' height='300px'
140+
v-bind:src='save_preview_src'
141+
>
142+
<ul>
143+
<li>
144+
Building:
145+
<input v-model='building'>
146+
</li>
147+
<li>
148+
Floor:
149+
<input v-model='floor'>
150+
</li>
151+
</ul>
152+
<table>
153+
<th> Save name </th>
154+
<th> Save </th>
155+
<th> Load</th>
156+
<tr v-for='(save, index) in saves'>
157+
<td v-on:click='handle_save_click(save)'> {{save}}
158+
<td> <button v-on:click='save_data(save)'>Save</button>
159+
<td> <button v-on:click='load_data(save)'>Load</button>
160+
</tr>
161+
</table>
162+
<div class = 'button-wrapper'>
163+
<button class='label' v-on:click='update_saves()'> Refresh </button>
164+
<button class='label' v-on:click='save_data()'> Save </button>
165+
<button class='label' v-on:click='clear_dbs()'> Delete all saves </button>
166+
</div>
167+
</div>
160168
</div>
161169

162170
</div>

0 commit comments

Comments
 (0)