Skip to content

Commit

Permalink
🚸 [feat/maps] #3 add some improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
JAGFx committed Dec 30, 2020
1 parent 5b23fc0 commit 3529f40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
24 changes: 14 additions & 10 deletions src/dashboards/maps/assets/scss/maps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
color: $cWhite;
border: 0;
border-bottom: 2px solid $cRed;
background: $cBlackTransparentMid;
font-size: 1.5rem;
background: transparentize($cBlackTransparentMid, .3);
font-size: 2rem;
padding: 0 0 .1rem 0;
margin-right: .15rem;
outline: 0;
Expand All @@ -49,6 +49,10 @@
margin-right: 0;
}
}

&.ol-zoom > button {
padding: 0 0 .4rem 0;
}
}

#rotate-wrapper {
Expand All @@ -62,14 +66,14 @@
justify-content: center;
align-items: center;
text-align: center;
font-size: .9rem;
font-size: 1rem;

i {
padding: .2rem 0 0 0;
}

&:not(.enable) {
background: $cBlackTransparentHigh;
background: transparentize($cBlackTransparentHigh, .3);
border-color: $cGray;
color: $cGray;
}
Expand All @@ -87,11 +91,11 @@
justify-content: center;
align-items: center;
text-align: center;
font-size: 1rem;
font-size: 1.5rem;
color: $cWhite;
border: 0;
border-bottom: 2px solid $cRed;
background: $cBlackTransparentMid;
background: transparentize($cBlackTransparentMid, .3);
padding: .5rem 0.5rem;
margin-right: .15rem;
outline: 0;
Expand All @@ -113,11 +117,11 @@
background: $cWhite;
border: .3rem solid $cRed;
border-radius: 100%;
width: 3rem;
height: 3rem;
width: 3.2rem;
height: 3.2rem;
color: $cBlack;
font-weight: bold;
font-size: 1.2rem;
font-size: 1.5rem;
}
}

Expand All @@ -127,7 +131,7 @@
height: 5rem;
left: 5rem;
top: 5rem;
background: $cBlackTransparentMid;
background: transparentize($cBlackTransparentMid, .3);;
}
}
}
12 changes: 4 additions & 8 deletions src/dashboards/maps/components/DashMaps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<button id="rotate-button" :class="{ enable: rotateWithPlayer }" @click="onClickRotate">
<i class="fas fa-location-arrow"></i>
</button>
<button id="center-button" :class="{ enable: focusOnPlayer }" @click="onClickCenter">
<button id="center-button" class="enable" @click="onClickCenter">
<i class="fas fa-bullseye"></i>
</button>
</div>
<div id="speed-limit">
<div id="speed-limit" v-show="telemetry.navigation.speedLimit.value > 0">
<span>{{ unit_speed( telemetry.navigation.speedLimit, true, false ) }}</span>
</div>
<div id="eta">
<div id="eta" v-show="telemetry.navigation.distance > 0">
ETA:
{{ $etaDueDate() | $dateTimeLocalized( DATE_FORMAT_LONG, TIME_FORMAT_SHORT ) }},
{{ unit_length( telemetry.navigation.distance, 'm' ) }},
Expand All @@ -35,8 +35,7 @@ export default {
},
data() {
return {
rotateWithPlayer: _maps.d.gBehaviorRotateWithPlayer,
focusOnPlayer: _maps.d.gBehaviorCenterOnPlayer
rotateWithPlayer: _maps.d.gBehaviorRotateWithPlayer
};
},
mounted() {
Expand All @@ -61,7 +60,6 @@ export default {
},
methods: {
onClickRotate() {
//console.log( 'R', _maps.d );
_maps.d.gBehaviorRotateWithPlayer = (_maps.d.gBehaviorCenterOnPlayer)
? !_maps.d.gBehaviorRotateWithPlayer
: true;
Expand All @@ -70,8 +68,6 @@ export default {
},
onClickCenter() {
_maps.d.gBehaviorCenterOnPlayer = !_maps.d.gBehaviorCenterOnPlayer;
this.focusOnPlayer = _maps.d.gBehaviorCenterOnPlayer;
}
}
};
Expand Down

0 comments on commit 3529f40

Please sign in to comment.