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