Browse Source

BI-6175 滑块宽高

es6
windy 7 years ago
parent
commit
7f1f3b3244
  1. 7
      src/addons/sliders/js/intervalslider/intervalslider.js
  2. 2
      src/addons/sliders/js/singleslider/singleslider.js

7
src/addons/sliders/js/intervalslider/intervalslider.js

@ -6,7 +6,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
EDITOR_WIDTH: 58, EDITOR_WIDTH: 58,
EDITOR_R_GAP: 60, EDITOR_R_GAP: 60,
EDITOR_HEIGHT: 30, EDITOR_HEIGHT: 30,
HEIGHT: 28,
SLIDER_WIDTH_HALF: 15, SLIDER_WIDTH_HALF: 15,
SLIDER_WIDTH: 30, SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30, SLIDER_HEIGHT: 30,
@ -51,7 +50,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
cls: "slider-editor-button", cls: "slider-editor-button",
errorText: "", errorText: "",
allowBlank: false, allowBlank: false,
height: c.HEIGHT,
width: c.EDITOR_WIDTH, width: c.EDITOR_WIDTH,
validationChecker: function (v) { validationChecker: function (v) {
return self._checkValidation(v); return self._checkValidation(v);
@ -78,7 +76,6 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
cls: "slider-editor-button", cls: "slider-editor-button",
errorText: "", errorText: "",
allowBlank: false, allowBlank: false,
height: c.HEIGHT,
width: c.EDITOR_WIDTH, width: c.EDITOR_WIDTH,
validationChecker: function (v) { validationChecker: function (v) {
return self._checkValidation(v); return self._checkValidation(v);
@ -122,6 +119,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
var significantPercent = BI.parseFloat(percent.toFixed(1)); var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderOnePosition(significantPercent); self._setSliderOnePosition(significantPercent);
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE); self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);
ui.helper.removeClass("dragging");
},
start: function (e, ui) {
ui.helper.removeClass("dragging").addClass("dragging");
} }
}); });

2
src/addons/sliders/js/singleslider/singleslider.js

@ -5,7 +5,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
_constant: { _constant: {
EDITOR_WIDTH: 90, EDITOR_WIDTH: 90,
EDITOR_HEIGHT: 30, EDITOR_HEIGHT: 30,
HEIGHT: 28,
SLIDER_WIDTH_HALF: 15, SLIDER_WIDTH_HALF: 15,
SLIDER_WIDTH: 30, SLIDER_WIDTH: 30,
SLIDER_HEIGHT: 30, SLIDER_HEIGHT: 30,
@ -98,7 +97,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
type: "bi.sign_editor", type: "bi.sign_editor",
cls: "slider-editor-button", cls: "slider-editor-button",
errorText: "", errorText: "",
height: c.HEIGHT,
width: c.EDITOR_WIDTH - 2, width: c.EDITOR_WIDTH - 2,
allowBlank: false, allowBlank: false,
validationChecker: function (v) { validationChecker: function (v) {

Loading…
Cancel
Save