mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
restore slider changes
This commit is contained in:
parent
cbb6337b41
commit
b3275bff3e
2 changed files with 12 additions and 2 deletions
|
@ -339,7 +339,7 @@ Custom property | Description | Default
|
||||||
on-up="_resetKnob"
|
on-up="_resetKnob"
|
||||||
on-track="_onTrack"
|
on-track="_onTrack"
|
||||||
on-transitionend="_knobTransitionEnd">
|
on-transitionend="_knobTransitionEnd">
|
||||||
<div id="sliderKnobInner" value$="[[immediateValue]]"></div>
|
<div id="sliderKnobInner" value$="[[pinValue]]"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template is="dom-if" if="[[editable]]">
|
<template is="dom-if" if="[[editable]]">
|
||||||
|
@ -538,6 +538,7 @@ Custom property | Description | Default
|
||||||
|
|
||||||
_positionKnob: function(ratio) {
|
_positionKnob: function(ratio) {
|
||||||
this._setImmediateValue(this._calcStep(this._calcKnobPosition(ratio)));
|
this._setImmediateValue(this._calcStep(this._calcKnobPosition(ratio)));
|
||||||
|
this._setPinValue(this.immediateValue);
|
||||||
this._setRatio(this._calcRatio(this.immediateValue));
|
this._setRatio(this._calcRatio(this.immediateValue));
|
||||||
|
|
||||||
this.$.sliderKnob.style.left = (this.ratio * 100) + '%';
|
this.$.sliderKnob.style.left = (this.ratio * 100) + '%';
|
||||||
|
@ -586,6 +587,7 @@ Custom property | Description | Default
|
||||||
// update knob's position
|
// update knob's position
|
||||||
var translateX = ((this._calcRatio(immediateValue) * this._w) - this._startx);
|
var translateX = ((this._calcRatio(immediateValue) * this._w) - this._startx);
|
||||||
this.translate3d(translateX + 'px', 0, 0, this.$.sliderKnob);
|
this.translate3d(translateX + 'px', 0, 0, this.$.sliderKnob);
|
||||||
|
this._setPinValue(immediateValue);
|
||||||
},
|
},
|
||||||
|
|
||||||
_trackEnd: function() {
|
_trackEnd: function() {
|
||||||
|
@ -600,6 +602,9 @@ Custom property | Description | Default
|
||||||
|
|
||||||
this.fire('change');
|
this.fire('change');
|
||||||
},
|
},
|
||||||
|
_setPinValue: function (value) {
|
||||||
|
this.pinValue = value;
|
||||||
|
},
|
||||||
|
|
||||||
_knobdown: function(event) {
|
_knobdown: function(event) {
|
||||||
this._expandKnob();
|
this._expandKnob();
|
||||||
|
|
|
@ -17949,7 +17949,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div id="sliderKnob" class="center-justified center horizontal layout" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd">
|
<div id="sliderKnob" class="center-justified center horizontal layout" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd">
|
||||||
<div id="sliderKnobInner" value$="[[immediateValue]]"></div>
|
<div id="sliderKnobInner" value$="[[pinValue]]"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template is="dom-if" if="[[editable]]">
|
<template is="dom-if" if="[[editable]]">
|
||||||
|
@ -18137,6 +18137,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||||||
|
|
||||||
_positionKnob: function(ratio) {
|
_positionKnob: function(ratio) {
|
||||||
this._setImmediateValue(this._calcStep(this._calcKnobPosition(ratio)));
|
this._setImmediateValue(this._calcStep(this._calcKnobPosition(ratio)));
|
||||||
|
this._setPinValue(this.immediateValue);
|
||||||
this._setRatio(this._calcRatio(this.immediateValue));
|
this._setRatio(this._calcRatio(this.immediateValue));
|
||||||
|
|
||||||
this.$.sliderKnob.style.left = (this.ratio * 100) + '%';
|
this.$.sliderKnob.style.left = (this.ratio * 100) + '%';
|
||||||
|
@ -18185,6 +18186,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||||||
// update knob's position
|
// update knob's position
|
||||||
var translateX = ((this._calcRatio(immediateValue) * this._w) - this._startx);
|
var translateX = ((this._calcRatio(immediateValue) * this._w) - this._startx);
|
||||||
this.translate3d(translateX + 'px', 0, 0, this.$.sliderKnob);
|
this.translate3d(translateX + 'px', 0, 0, this.$.sliderKnob);
|
||||||
|
this._setPinValue(immediateValue);
|
||||||
},
|
},
|
||||||
|
|
||||||
_trackEnd: function() {
|
_trackEnd: function() {
|
||||||
|
@ -18199,6 +18201,9 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||||||
|
|
||||||
this.fire('change');
|
this.fire('change');
|
||||||
},
|
},
|
||||||
|
_setPinValue: function (value) {
|
||||||
|
this.pinValue = value;
|
||||||
|
},
|
||||||
|
|
||||||
_knobdown: function(event) {
|
_knobdown: function(event) {
|
||||||
this._expandKnob();
|
this._expandKnob();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue