Skip to content

Commit

Permalink
Make size of overview map configurable via app configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
fschmenger committed Nov 25, 2021
1 parent 7c31e38 commit 464a202
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/assets/css/wegue.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ html {

.wgu-overviewmap-ctrl,
.wgu-overviewmap-ctrl.ol-uncollapsible {
line-height: normal;
width: 100%;
height: 100%;
}

.wgu-overviewmap-ctrl .ol-overviewmap-map {
border: none;
width: 152px;
height: 166px;
width: 100%;
height: 100%;
}

/* TODO
Expand Down
6 changes: 5 additions & 1 deletion src/components/overviewmap/OverviewMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
color="white"
:dark="false"
:rotateWithView="rotateWithView"
:width="width"
:height="height"
/>
</v-menu>
</div>
Expand All @@ -43,7 +45,9 @@ export default {
icon: { type: String, required: false, default: 'zoom_out_map' },
dark: { type: Boolean, required: false, default: true },
visible: { type: Boolean, required: false, default: true },
rotateWithView: { type: Boolean, required: false, default: true }
rotateWithView: { type: Boolean, required: false, default: true },
width: { type: Number, required: false, default: 164 },
height: { type: Number, required: false, default: 178 }
},
data () {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/components/overviewmap/OverviewMapController.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class OverviewMapController {
* @param {String} color The color to set.
*/
setOlStyle (color) {
document.querySelector('.ol-overviewmap-map').classList.add('v-card', 'ma-1');
document.querySelector('.ol-overviewmap-map').classList.add('v-card', 'ma-0');
}

/**
Expand Down
9 changes: 6 additions & 3 deletions src/components/overviewmap/OverviewMapPanel.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<v-sheet :color="color" :dark="dark" elevation="8" ref="overviewmapPanel">
<v-sheet :color="color" :dark="dark" :width="width" :height="height"
elevation="8" class="pa-1" ref="overviewmapPanel">
</v-sheet>
</template>

Expand All @@ -11,8 +12,10 @@
mixins: [Mapable],
props: {
dark: { type: Boolean, required: true },
color: { type: String, required: false, default: 'white' },
rotateWithView: { type: Boolean, required: false, default: true }
color: { type: String, required: true },
rotateWithView: { type: Boolean, required: true },
width: { type: Number, required: true },
height: { type: Number, required: true }
},
data () {
return {
Expand Down

0 comments on commit 464a202

Please sign in to comment.