vue-slider-component icon indicating copy to clipboard operation
vue-slider-component copied to clipboard

Setting maxRange changes behavior when both dots are at max

Open EdmundoDelGusto opened this issue 3 years ago • 1 comments

Without maxRange setted When both dots are at max, and I pull the overlapping dots to the left, only the lower dot gets dragged to the left, while the upper dot stays at the right. This is to me the desired behavior.

When maxRange is setted When both dots are at max, and I pull the overlapping dots to the left, both dots get dragged to the left. Not desired behavior

https://jsfiddle.net/EdmundoDelGusto/qLhkm96n/4/

EdmundoDelGusto avatar Feb 18 '22 10:02 EdmundoDelGusto

Same issue. You can use computed class and styles, something like:

computed for class wrapper

const isMoreThanHalf = computed(() => {
return ((maxRange-minRange) / (maxRange - minValue)) > 2
})

And styles:

.you-computed-classname {
.vue-slider-dot:nth-child(even) {
      z-index: 6;
    }
}

sinneren avatar May 25 '23 12:05 sinneren