mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2024-12-22 16:16:24 +00:00
limit range of progress
This commit is contained in:
parent
564f3c57f8
commit
ecba2ba7dc
@ -13,9 +13,10 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
function updateState(value) {
|
function updateState(value) {
|
||||||
|
const max = 359.99999
|
||||||
const R = 50
|
const R = 50
|
||||||
let alpha = (360 / 1) * value
|
let alpha = (360 / 1) * value
|
||||||
if (alpha === 360) alpha = 359.99999
|
alpha = Math.min(alpha, max)
|
||||||
const a = ((90 - alpha) * Math.PI) / 180
|
const a = ((90 - alpha) * Math.PI) / 180
|
||||||
const x = R + R * Math.cos(a) * 2
|
const x = R + R * Math.cos(a) * 2
|
||||||
const y = R - R * Math.sin(a) * 2
|
const y = R - R * Math.sin(a) * 2
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import { scroll } from '../lib/scroll'
|
import { scroll } from '../lib/scroll'
|
||||||
import Nav from '../components/Nav.svelte'
|
import Nav from '../components/Nav.svelte'
|
||||||
import Loading from '../components/Loading.svelte'
|
import Progress from '../components/Progress.svelte'
|
||||||
|
|
||||||
export let segment
|
export let segment
|
||||||
let wrapper
|
let wrapper
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
{#if $page.path !== '/'}
|
{#if $page.path !== '/'}
|
||||||
<Loading />
|
<Progress />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -69,7 +69,6 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
max-width: calc(100% - 4em);
|
max-width: calc(100% - 4em);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
scroll-behavior: smooth;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 30em) {
|
@media (max-width: 30em) {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
|
Loading…
Reference in New Issue
Block a user