Browse Source

CHART-12259 && BI-58432

master
windy 5 years ago
parent
commit
cde33ae9a0
  1. 3
      changelog.md
  2. 3
      src/widget/datetimepane/card.static.datetimepane.js
  3. 4
      src/widget/singleslider/singleslider.js
  4. 2
      src/widget/singleslider/singleslider.label.js
  5. 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));

4
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;
@ -71,6 +71,7 @@ BI.SingleSlider = BI.inherit(BI.Single, {
v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v);
self.value = v;
console.log("click");
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}
});
@ -173,6 +174,7 @@ BI.SingleSlider = BI.inherit(BI.Single, {
}
widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves();
console.log("drag");
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}, window);
widget.element.on("mousedown", function (event) {

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