Skip to content

Commit

Permalink
🐛 fix(Timeline):Timeline makes a tour of all the tasks before reachin…
Browse files Browse the repository at this point in the history
…g the current
  • Loading branch information
MetalPrime committed Apr 4, 2024
1 parent e69ab1e commit f154ec6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
13 changes: 11 additions & 2 deletions marlo-web/src/main/webapp/crp/css/home/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ span.timelineControl:hover {
#timelineContainer {
position: relative;
margin: 18px 30px 18px 30px;
scroll-behavior: smooth;
overflow-x: scroll;
overflow-y: hidden;
height: 36vh;
Expand Down Expand Up @@ -603,7 +602,17 @@ span.timelineControl:hover {
background-color: #0377a3;
}


.timelineAlert_item_color--1{
background-color: #F9C786;
}

.timelineAlert_item_color--2{
background-color: #81B8C1;
}

.timelineAlert_item_color--3{
background-color: #B5D08B;
}
/*************** sectionMap ********************/

.sectionMap{
Expand Down
8 changes: 5 additions & 3 deletions marlo-web/src/main/webapp/crp/js/home/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ function moveScrollRight() {
const widthContainer = $('.sectionMap').width();
const containerSize = widthContainer * 0.8;

element.style.scrollBehavior = "smooth"
element.scrollLeft += (containerSize+(containerSize* (2/5)));
}

Expand All @@ -165,6 +166,7 @@ function moveScrollLeft() {
const widthContainer = $('.sectionMap').width();
const containerSize = widthContainer * 0.8;

element.style.scrollBehavior = "smooth"
element.scrollLeft -= (containerSize+(containerSize* (2/5)));
}

Expand Down Expand Up @@ -341,15 +343,15 @@ function createTimeline2() {
<b>Progress status:</b>
<section id="timelineAlert_container">
<article class="timelineAlert_item">
<div class="timelineAlert_item_color"></div>
<div class="timelineAlert_item_color timelineAlert_item_color--1"></div>
<p>Not started</p>
</article>
<article class="timelineAlert_item">
<div class="timelineAlert_item_color"></div>
<div class="timelineAlert_item_color timelineAlert_item_color--2"></div>
<p>In progress</p>
</article>
<article class="timelineAlert_item">
<div class="timelineAlert_item_color"></div>
<div class="timelineAlert_item_color timelineAlert_item_color--3"></div>
<p>Completed</p>
</article>
</section>
Expand Down

0 comments on commit f154ec6

Please sign in to comment.