Skip to content

Commit fa016ad

Browse files
finally looks ok!
1 parent 9dec96c commit fa016ad

File tree

3 files changed

+33
-17
lines changed

3 files changed

+33
-17
lines changed

src/App.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div id="app">
33
<div id="nav">
4-
<router-link to="/">Home</router-link> |
5-
<router-link to="/about">About</router-link>
4+
<router-link to="/">Open Map Data</router-link> |
5+
<router-link to="/home">Home</router-link>
66
</div>
77
<router-view/>
88
</div>

src/components/MapData.vue

+23-7
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
<div class="open-data--utility-control open-data--utility-control__add" v-on:click="updateMapLocations()">Update locations</div>
1111
<div class="open-data--utility-control open-data--utility-control__remove" v-on:click="removeAllMapLayers()">Remove locations</div>
1212
<div class="clearfix"></div>
13+
<div class="open-data--utility-control-toggle" id="utility_control_panel_toggle"><div class="open-data--utility-control-toggle-arrow" v-on:click="toggleUtilityControls()">Toggle Controls</div>
1314
</div>
14-
<div class="open-data--utility-control-toggle"><div class="open-data--utility-control-toggle-arrow" v-on:click="toggleUtilityControls()">
15+
1516
</div>
1617
<!--<div class="open-data--utility-control-toggle"><div class="open-data--utility-control-toggle-arrow" v-on:click="toggleUtilityControls()">V</div></div>-->
1718

@@ -21,10 +22,12 @@
2122
<polygon class="arrow-middle" points="37.6,45.8 0.8,18.7 4.4,16.4 37.6,41.2 71.2,16.4 74.5,18.7 "/>
2223
<polygon class="arrow-bottom" points="37.6,64 0,36.1 5.1,32.8 37.6,56.8 70.4,32.8 75.5,36.1 "/>
2324
</svg>-->
24-
</div></div>
25+
</div>
2526
<div class="open-data--map-data--category-container">
26-
<div class="open-data--selected-item" v-bind:style="selected_map_category.item_styles || {}" v-on:click="toggleMapLayer(selected_map_category)" v-for="(selected_map_category, index) in selectedGeoJsonData">
27-
{{selected_map_category.name}}
27+
<div class="open-data--selected-items">
28+
<div class="open-data--selected-item" v-bind:style="selected_map_category.item_styles || {}" v-on:click="toggleMapLayer(selected_map_category)" v-bind:key="selected_map_category.id" v-for="(selected_map_category, index) in selectedGeoJsonData">
29+
{{selected_map_category.name}}
30+
</div>
2831
</div>
2932
<input type="textbox" class="open-data--map-data--filter-input" v-model="filterTerm" v-on:keyup="filterMapCategories()" placeholder="Filter selection here..." id="map_data_filter_input"/>
3033
<div class="open-data--list-container">
@@ -202,16 +205,23 @@
202205
},
203206
toggleUtilityControls: function () {
204207
let control_panel = document.getElementById("utility_control_panel");
208+
console.log("control panel", control_panel)
205209
if (control_panel.className.includes("open-data--utility-control-panel__open")) {
206210
control_panel.classList.remove("open-data--utility-control-panel__open");
211+
let control_panel_toggle = document.getElementById("utility_control_panel_toggle");
212+
control_panel_toggle.style.display = "none";
207213
}
208214
else {
209215
control_panel.classList.add("open-data--utility-control-panel__open");
210216
}
217+
211218
}
212219
},
213-
updated: function () {
214-
220+
created() {
221+
console.log("y not tho");
222+
this.$nextTick(function () {
223+
this.initializeMap();
224+
});
215225
},
216226
name: "mapData",
217227
};
@@ -262,6 +272,10 @@
262272
padding: 5px;
263273
}
264274
275+
.open-data--selected-items {
276+
margin-top: 5px;
277+
}
278+
265279
.open-data--name {
266280
text-overflow: ellipsis;
267281
}
@@ -291,8 +305,10 @@
291305
292306
.open-data--list-container {
293307
border-bottom: 3px solid black;
308+
border-top: #C3C3C3 1px solid;
294309
height: 100%;
295310
margin-bottom: -50px;
311+
margin-top: 30px;
296312
position: relative;
297313
overflow: hidden;
298314
width: 100%;
@@ -361,7 +377,7 @@
361377
}
362378
.open-data--utility-control-panel {
363379
display: block;
364-
height: 50px;
380+
height: 0;
365381
overflow: hidden;
366382
position: relative;
367383
text-align: center;

src/router.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ Vue.use(Router)
99
export default new Router({
1010
routes: [
1111
{
12-
path: '/',
12+
path: '/home',
1313
name: 'home',
14-
component: Home
15-
},
16-
{
17-
path: '/about',
18-
name: 'about',
1914
// route level code-splitting
2015
// this generates a separate chunk (about.[hash].js) for this route
2116
// which is lazy-loaded when the route is visited.
22-
component: About,
17+
component: Home,
2318
props: {
2419
//geo_json_data: Maps.retrieveGeoJsonData(),
2520
},
26-
}
21+
},
22+
{
23+
path: '/',
24+
name: 'about',
25+
component: About
26+
},
2727
]
2828
})

0 commit comments

Comments
 (0)