Browse Source

Merge pull request #1230 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '52a569fc00b1f03d2c1e871f02f12f04de0b3b98':
  小数位数
  去掉console
  CHART-12259 && BI-58432
master
windy 5 years ago
parent
commit
15ceade62b
  1. 3
      changelog.md
  2. 3
      src/widget/datetimepane/card.static.datetimepane.js
  3. 5
      src/widget/intervalslider/intervalslider.js
  4. 2
      src/widget/singleslider/singleslider.js
  5. 2
      src/widget/singleslider/singleslider.label.js
  6. 2
      src/widget/singleslider/singleslider.normal.js

3
changelog.md

@ -1,4 +1,7 @@
# 更新日志
2.0(2020-1)
- 修复单值系滑块滑动松手后发两次EVENT_CHANGE的问题
2.0(2019-12)
- 修复多层级单选下拉树主动设置container后搜索面板弹出问题
- bi.search_editor支持搜索中间含有空格的字符串

3
src/widget/datetimepane/card.static.datetimepane.js

@ -36,8 +36,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
}
self.selectedTime = BI.extend(self.selectedTime, {
year: value.year,
month: value.month,
day: day
month: value.month
});
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));

5
src/widget/intervalslider/intervalslider.js

@ -514,13 +514,14 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
},
populate: function () {
var o = this.options;
if (!isNaN(this.min) && !isNaN(this.max)) {
this.enable = true;
this._setVisible(true);
this._setErrorText();
if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) {
this.labelOne.setValue(this.valueOne);
this.labelTwo.setValue(this.valueTwo);
this.labelOne.setValue(o.digit === false ? this.valueOne : BI.parseFloat(this.valueOne).toFixed(o.digit));
this.labelTwo.setValue(o.digit === false ? this.valueTwo : BI.parseFloat(this.valueTwo).toFixed(o.digit));
this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo));
} else {
this.labelOne.setValue(this.min);

2
src/widget/singleslider/singleslider.js

@ -52,7 +52,7 @@ BI.SingleSlider = BI.inherit(BI.Single, {
});
// 这边其实是有问题的,拖拽区域是个圆,在圆的边缘拖拽后放开,这边计算出来的蓝条宽度实际上会比放开时长一点或者短一点
sliderVertical.element.click(function (e) {
if (self.enable && self.isEnabled()) {
if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {
var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;
var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;
var percent = 0;

2
src/widget/singleslider/singleslider.label.js

@ -54,7 +54,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
height: c.SLIDER_HEIGHT
});
sliderVertical.element.click(function (e) {
if (self.enable && self.isEnabled()) {
if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {
var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;
var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;
var percent = 0;

2
src/widget/singleslider/singleslider.normal.js

@ -42,7 +42,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Single, {
height: c.SLIDER_HEIGHT
});
sliderVertical.element.click(function (e) {
if (self.enable && self.isEnabled()) {
if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {
var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;
var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;
var percent = 0;

Loading…
Cancel
Save