#31 : Update progress position
This commit is contained in:
@@ -268,7 +268,6 @@
|
|||||||
_duration = 0
|
_duration = 0
|
||||||
}
|
}
|
||||||
function handleThreshold(event) {
|
function handleThreshold(event) {
|
||||||
// TODO: is it correct?
|
|
||||||
directionFnDescription[event.detail.direction]()
|
directionFnDescription[event.detail.direction]()
|
||||||
}
|
}
|
||||||
function handleSwipeMove(event) {
|
function handleSwipeMove(event) {
|
||||||
@@ -317,6 +316,11 @@
|
|||||||
>
|
>
|
||||||
<slot {loaded}></slot>
|
<slot {loaded}></slot>
|
||||||
</div>
|
</div>
|
||||||
|
{#if autoplayProgressVisible}
|
||||||
|
<div class="sc-carousel-progress__container">
|
||||||
|
<Progress value={progressValue} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if arrows}
|
{#if arrows}
|
||||||
<slot name="next" {showNextPage}>
|
<slot name="next" {showNextPage}>
|
||||||
@@ -344,8 +348,6 @@
|
|||||||
></Dots>
|
></Dots>
|
||||||
</slot>
|
</slot>
|
||||||
{/if}
|
{/if}
|
||||||
{progressValue}
|
|
||||||
<Progress value={progressValue} />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -365,6 +367,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.sc-carousel__pages-container {
|
.sc-carousel__pages-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -378,4 +381,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
.sc-carousel-progress__container {
|
||||||
|
width: 100%;
|
||||||
|
height: 7px;
|
||||||
|
background-color: lightgray;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -12,21 +12,14 @@
|
|||||||
$: width = Math.min(value * MAX_PERCENT, MAX_PERCENT)
|
$: width = Math.min(value * MAX_PERCENT, MAX_PERCENT)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="sc-carousel-progress__container">
|
<div
|
||||||
<div
|
class="sc-carousel-progress__indicator"
|
||||||
class="sc-carousel-progress__indicator"
|
style="
|
||||||
style="
|
width: {width}%;
|
||||||
width: {width}%;
|
"
|
||||||
"
|
></div>
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.sc-carousel-progress__container {
|
|
||||||
width: 100%;
|
|
||||||
height: 20px;
|
|
||||||
background-color: lightgray;
|
|
||||||
}
|
|
||||||
.sc-carousel-progress__indicator {
|
.sc-carousel-progress__indicator {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: gray;
|
background-color: gray;
|
||||||
|
|||||||
Reference in New Issue
Block a user