restore slider changes
This commit is contained in:
parent
019c63c88a
commit
7f0e5e8cd8
1 changed files with 6 additions and 1 deletions
|
@ -343,7 +343,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]]">
|
||||||
|
@ -542,6 +542,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) + '%';
|
||||||
|
@ -590,6 +591,10 @@ 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);
|
||||||
|
},
|
||||||
|
_setPinValue: function (value) {
|
||||||
|
this.pinValue = value;
|
||||||
},
|
},
|
||||||
|
|
||||||
_trackEnd: function() {
|
_trackEnd: function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue