forked from MapComplete/MapComplete
Fix: fix compass widget width
This commit is contained in:
parent
54b85d0fe9
commit
66f093afd8
1 changed files with 2 additions and 8 deletions
|
@ -1,24 +1,18 @@
|
||||||
<script lang="ts">/**
|
<script lang="ts">/**
|
||||||
* Show a compass. The compass outline rotates with the map, the compass needle points to the actual north
|
* Show a compass. The compass outline rotates with the map, the compass needle points to the actual north
|
||||||
*/
|
*/
|
||||||
import { Stores, UIEventSource } from "../../Logic/UIEventSource"
|
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||||
import { Orientation } from "../../Sensors/Orientation"
|
import { Orientation } from "../../Sensors/Orientation"
|
||||||
import Compass_back from "../../assets/svg/Compass_back.svelte"
|
import Compass_back from "../../assets/svg/Compass_back.svelte"
|
||||||
import Compass_needle from "../../assets/svg/Compass_needle.svelte"
|
import Compass_needle from "../../assets/svg/Compass_needle.svelte"
|
||||||
import North_arrow from "../../assets/svg/North_arrow.svelte"
|
import North_arrow from "../../assets/svg/North_arrow.svelte"
|
||||||
import Popup from "../Base/Popup.svelte"
|
|
||||||
import { Popover } from "flowbite-svelte"
|
|
||||||
import Tr from "../Base/Tr.svelte"
|
|
||||||
import { fade } from "svelte/transition"
|
|
||||||
import ThemeViewState from "../../Models/ThemeViewState"
|
|
||||||
import { onDestroy } from "svelte"
|
|
||||||
import { Store } from "../../Logic/UIEventSource"
|
import { Store } from "../../Logic/UIEventSource"
|
||||||
import { Translation } from "../i18n/Translation"
|
import { Translation } from "../i18n/Translation"
|
||||||
|
|
||||||
export let mapProperties: { rotation: UIEventSource<number>, allowRotating: Store<boolean> }
|
export let mapProperties: { rotation: UIEventSource<number>, allowRotating: Store<boolean> }
|
||||||
let orientation = Orientation.singleton.alpha
|
let orientation = Orientation.singleton.alpha
|
||||||
let mapRotation = mapProperties.rotation
|
let mapRotation = mapProperties.rotation
|
||||||
export let size = "h-10"
|
export let size = "h-10 w-10"
|
||||||
let wrapperClass = "absolute top-0 left-0 " + size
|
let wrapperClass = "absolute top-0 left-0 " + size
|
||||||
let compassLoaded = Orientation.singleton.gotMeasurement
|
let compassLoaded = Orientation.singleton.gotMeasurement
|
||||||
let allowRotation = mapProperties.allowRotating
|
let allowRotation = mapProperties.allowRotating
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue