do not show sun into compass rose if sun heading is undefined (#3713)

This commit is contained in:
David Tsay 2021-02-25 13:22:59 -08:00 committed by GitHub
parent 5377f0d0b3
commit 16249c3790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,7 @@
</div>
<div
v-if="showSunHeading"
class="c-sun"
:style="sunHeadingStyle"
></div>
@ -229,6 +230,9 @@ export default {
transform: `rotate(${ rotation }deg)`
};
},
showSunHeading() {
return this.sunHeading !== undefined;
},
sunHeadingStyle() {
const rotation = rotate(this.north, this.sunHeading);