scale 0
This commit is contained in:
parent
97eabe92db
commit
b78b0a29e5
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.118.1-calc.12",
|
"version": "12.118.1-calc.12.1",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -274,7 +274,7 @@ if (isMobile.value) {
|
||||||
timelines.push('global');
|
timelines.push('global');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(xDiff) > Math.abs(yDiff) && Math.abs(xDiff) > 100) {
|
if (Math.abs(xDiff) > Math.abs(yDiff) && Math.abs(xDiff) > 50) {
|
||||||
if (xDiff < 0) {
|
if (xDiff < 0) {
|
||||||
if (src === 'home') {
|
if (src === 'home') {
|
||||||
next = 'global';
|
next = 'global';
|
||||||
|
|
|
@ -136,21 +136,13 @@ onMounted(() => {
|
||||||
if (window.innerWidth >= DESKTOP_THRESHOLD) isDesktop.value = true;
|
if (window.innerWidth >= DESKTOP_THRESHOLD) isDesktop.value = true;
|
||||||
}, { passive: true });
|
}, { passive: true });
|
||||||
|
|
||||||
let scrollPos = 0;
|
|
||||||
|
|
||||||
window.addEventListener('scroll', () => {
|
|
||||||
let windowY = window.scrollY;
|
|
||||||
postButton.style.transform = `scale(${windowY < scrollPos ? '1' : '0.3'})`;
|
|
||||||
scrollPos = windowY;
|
|
||||||
}, { passive: true });
|
|
||||||
|
|
||||||
function createScrollStopListener(element: Window, callback: TimerHandler, timeout: number): () => void {
|
function createScrollStopListener(element: Window, callback: TimerHandler, timeout: number): () => void {
|
||||||
let handle = 0;
|
let handle = 0;
|
||||||
const onScroll = () => {
|
const onScroll = () => {
|
||||||
if (handle) {
|
if (handle) {
|
||||||
clearTimeout(handle);
|
clearTimeout(handle);
|
||||||
}
|
}
|
||||||
postButton.style.transform = 'scale(0.3)';
|
postButton.style.transform = 'scale(0)';
|
||||||
handle = setTimeout(callback, timeout || 200);
|
handle = setTimeout(callback, timeout || 200);
|
||||||
};
|
};
|
||||||
element.addEventListener('scroll', onScroll, { passive: true });
|
element.addEventListener('scroll', onScroll, { passive: true });
|
||||||
|
|
Loading…
Reference in New Issue