Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
[apps] ajust scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
codesardine committed Dec 21, 2020
1 parent bf4d4ad commit 3a3872a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,21 +320,20 @@ function init() {

function appsScrolllAnimation(direction) {
clearInterval(scroll)
let apps = desktop.elem(".grid")
let height = apps.getBoundingClientRect()["height"]
let scroll = 76
let pixels = 1;
let timer = 1;
let speed = 6

scroll = setInterval(function() {
interval = setInterval(function() {
if ( direction === "down" ) {
apps.scrollBy(0, pixels);
} else if ( direction === "up" ) {
apps.scrollBy(0, - pixels);
}
pixels += speed;
if ( pixels > height ) {
clearInterval(scroll)
if ( pixels >= scroll ) {
clearInterval(interval)
}
}, timer);
}
Expand Down
6 changes: 3 additions & 3 deletions src/themes/default/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ body * {
left: 0;
right: 0;
padding: 0 5%;
padding-bottom: 0;
padding-bottom: 6px;
}

.text-color, .app-title,
Expand All @@ -63,7 +63,7 @@ color: #e4e4e4 !important;


.icons-container {
padding-top: 10px;
padding-top: 11px;
overflow: hidden;
}

Expand Down Expand Up @@ -123,7 +123,7 @@ color: #e4e4e4 !important;
.grid-item {
margin-left: 1.8rem;
margin-right: 1.8rem;
margin-bottom: 2.6rem;
margin-bottom: 40px;
min-width: 120px;
transition: transform 0.1s ease-in-out;
}
Expand Down

0 comments on commit 3a3872a

Please sign in to comment.