Commit 735ef1ac authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Slider: reset size on click / drag

parent 4ebb9983
......@@ -138,6 +138,7 @@
onDragging(event) {
if (this.dragging) {
this.displayTooltip();
this.$parent.resetSize();
let diff = 0;
if (this.vertical) {
this.currentY = event.clientY;
......
......@@ -221,6 +221,7 @@
onSliderClick(event) {
if (this.disabled || this.dragging) return;
this.resetSize();
if (this.vertical) {
const sliderOffsetBottom = this.$refs.slider.getBoundingClientRect().bottom;
this.setPosition((sliderOffsetBottom - event.clientY) / this.sliderSize * 100);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment