Browse Source

Merge pull request #215 in ~GUY/fineui from ~WINDY/fineui:master to master

* commit 'fce1338055158714e0c825403bd1c3750c25a64f':
  搬运少了
es6
windy 7 years ago
parent
commit
3ea5efc019
  1. 5
      bi/widget.js
  2. 5
      dist/bundle.js
  3. 18
      dist/bundle.min.js
  4. 609
      dist/resource.css
  5. 5
      dist/widget.js
  6. 5
      src/widget/intervalslider/intervalslider.label.js

5
bi/widget.js

@ -6198,19 +6198,23 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
}, },
_rePosBySizeAfterMove: function (size, isLeft) { _rePosBySizeAfterMove: function (size, isLeft) {
var o = this.options;
var percent = size * 100 / (this._getGrayTrackLength()); var percent = size * 100 / (this._getGrayTrackLength());
var significantPercent = BI.parseFloat(percent.toFixed(1)); var significantPercent = BI.parseFloat(percent.toFixed(1));
var v = this._getValueByPercent(significantPercent); var v = this._getValueByPercent(significantPercent);
v = this._assertValue(v); v = this._assertValue(v);
v = o.digit === false ? v : v.toFixed(o.digit);
if(isLeft){ if(isLeft){
this._setLabelOnePosition(significantPercent); this._setLabelOnePosition(significantPercent);
this._setSliderOnePosition(significantPercent); this._setSliderOnePosition(significantPercent);
this.labelOne.setValue(v); this.labelOne.setValue(v);
self.labelOne.setText(v + o.unit);
this.valueOne = v; this.valueOne = v;
}else{ }else{
this._setLabelTwoPosition(significantPercent); this._setLabelTwoPosition(significantPercent);
this._setSliderTwoPosition(significantPercent); this._setSliderTwoPosition(significantPercent);
this.labelTwo.setValue(v); this.labelTwo.setValue(v);
self.labelTwo.setText(v + o.unit);
this.valueTwo = v; this.valueTwo = v;
} }
this._setBlueTrack(); this._setBlueTrack();
@ -6511,6 +6515,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
var valueOne = BI.parseFloat(v.min); var valueOne = BI.parseFloat(v.min);
var valueTwo = BI.parseFloat(v.max); var valueTwo = BI.parseFloat(v.max);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit); valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
valueTwo = o.digit === false ? valueTwo : valueTwo.toFixed(o.digit);
if (!isNaN(valueOne) && !isNaN(valueTwo)) { if (!isNaN(valueOne) && !isNaN(valueTwo)) {
if (this._checkValidation(valueOne)) { if (this._checkValidation(valueOne)) {
this.valueOne = valueOne; this.valueOne = valueOne;

5
dist/bundle.js vendored

@ -81213,19 +81213,23 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
}, },
_rePosBySizeAfterMove: function (size, isLeft) { _rePosBySizeAfterMove: function (size, isLeft) {
var o = this.options;
var percent = size * 100 / (this._getGrayTrackLength()); var percent = size * 100 / (this._getGrayTrackLength());
var significantPercent = BI.parseFloat(percent.toFixed(1)); var significantPercent = BI.parseFloat(percent.toFixed(1));
var v = this._getValueByPercent(significantPercent); var v = this._getValueByPercent(significantPercent);
v = this._assertValue(v); v = this._assertValue(v);
v = o.digit === false ? v : v.toFixed(o.digit);
if(isLeft){ if(isLeft){
this._setLabelOnePosition(significantPercent); this._setLabelOnePosition(significantPercent);
this._setSliderOnePosition(significantPercent); this._setSliderOnePosition(significantPercent);
this.labelOne.setValue(v); this.labelOne.setValue(v);
self.labelOne.setText(v + o.unit);
this.valueOne = v; this.valueOne = v;
}else{ }else{
this._setLabelTwoPosition(significantPercent); this._setLabelTwoPosition(significantPercent);
this._setSliderTwoPosition(significantPercent); this._setSliderTwoPosition(significantPercent);
this.labelTwo.setValue(v); this.labelTwo.setValue(v);
self.labelTwo.setText(v + o.unit);
this.valueTwo = v; this.valueTwo = v;
} }
this._setBlueTrack(); this._setBlueTrack();
@ -81526,6 +81530,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
var valueOne = BI.parseFloat(v.min); var valueOne = BI.parseFloat(v.min);
var valueTwo = BI.parseFloat(v.max); var valueTwo = BI.parseFloat(v.max);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit); valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
valueTwo = o.digit === false ? valueTwo : valueTwo.toFixed(o.digit);
if (!isNaN(valueOne) && !isNaN(valueTwo)) { if (!isNaN(valueOne) && !isNaN(valueTwo)) {
if (this._checkValidation(valueOne)) { if (this._checkValidation(valueOne)) {
this.valueOne = valueOne; this.valueOne = valueOne;

18
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

609
dist/resource.css vendored

File diff suppressed because it is too large Load Diff

5
dist/widget.js vendored

@ -6198,19 +6198,23 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
}, },
_rePosBySizeAfterMove: function (size, isLeft) { _rePosBySizeAfterMove: function (size, isLeft) {
var o = this.options;
var percent = size * 100 / (this._getGrayTrackLength()); var percent = size * 100 / (this._getGrayTrackLength());
var significantPercent = BI.parseFloat(percent.toFixed(1)); var significantPercent = BI.parseFloat(percent.toFixed(1));
var v = this._getValueByPercent(significantPercent); var v = this._getValueByPercent(significantPercent);
v = this._assertValue(v); v = this._assertValue(v);
v = o.digit === false ? v : v.toFixed(o.digit);
if(isLeft){ if(isLeft){
this._setLabelOnePosition(significantPercent); this._setLabelOnePosition(significantPercent);
this._setSliderOnePosition(significantPercent); this._setSliderOnePosition(significantPercent);
this.labelOne.setValue(v); this.labelOne.setValue(v);
self.labelOne.setText(v + o.unit);
this.valueOne = v; this.valueOne = v;
}else{ }else{
this._setLabelTwoPosition(significantPercent); this._setLabelTwoPosition(significantPercent);
this._setSliderTwoPosition(significantPercent); this._setSliderTwoPosition(significantPercent);
this.labelTwo.setValue(v); this.labelTwo.setValue(v);
self.labelTwo.setText(v + o.unit);
this.valueTwo = v; this.valueTwo = v;
} }
this._setBlueTrack(); this._setBlueTrack();
@ -6511,6 +6515,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
var valueOne = BI.parseFloat(v.min); var valueOne = BI.parseFloat(v.min);
var valueTwo = BI.parseFloat(v.max); var valueTwo = BI.parseFloat(v.max);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit); valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
valueTwo = o.digit === false ? valueTwo : valueTwo.toFixed(o.digit);
if (!isNaN(valueOne) && !isNaN(valueTwo)) { if (!isNaN(valueOne) && !isNaN(valueTwo)) {
if (this._checkValidation(valueOne)) { if (this._checkValidation(valueOne)) {
this.valueOne = valueOne; this.valueOne = valueOne;

5
src/widget/intervalslider/intervalslider.label.js

@ -94,19 +94,23 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
}, },
_rePosBySizeAfterMove: function (size, isLeft) { _rePosBySizeAfterMove: function (size, isLeft) {
var o = this.options;
var percent = size * 100 / (this._getGrayTrackLength()); var percent = size * 100 / (this._getGrayTrackLength());
var significantPercent = BI.parseFloat(percent.toFixed(1)); var significantPercent = BI.parseFloat(percent.toFixed(1));
var v = this._getValueByPercent(significantPercent); var v = this._getValueByPercent(significantPercent);
v = this._assertValue(v); v = this._assertValue(v);
v = o.digit === false ? v : v.toFixed(o.digit);
if(isLeft){ if(isLeft){
this._setLabelOnePosition(significantPercent); this._setLabelOnePosition(significantPercent);
this._setSliderOnePosition(significantPercent); this._setSliderOnePosition(significantPercent);
this.labelOne.setValue(v); this.labelOne.setValue(v);
self.labelOne.setText(v + o.unit);
this.valueOne = v; this.valueOne = v;
}else{ }else{
this._setLabelTwoPosition(significantPercent); this._setLabelTwoPosition(significantPercent);
this._setSliderTwoPosition(significantPercent); this._setSliderTwoPosition(significantPercent);
this.labelTwo.setValue(v); this.labelTwo.setValue(v);
self.labelTwo.setText(v + o.unit);
this.valueTwo = v; this.valueTwo = v;
} }
this._setBlueTrack(); this._setBlueTrack();
@ -407,6 +411,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
var valueOne = BI.parseFloat(v.min); var valueOne = BI.parseFloat(v.min);
var valueTwo = BI.parseFloat(v.max); var valueTwo = BI.parseFloat(v.max);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit); valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
valueTwo = o.digit === false ? valueTwo : valueTwo.toFixed(o.digit);
if (!isNaN(valueOne) && !isNaN(valueTwo)) { if (!isNaN(valueOne) && !isNaN(valueTwo)) {
if (this._checkValidation(valueOne)) { if (this._checkValidation(valueOne)) {
this.valueOne = valueOne; this.valueOne = valueOne;

Loading…
Cancel
Save