Browse Source

BI.Slider已被注册

es6
Urthur 7 years ago
parent
commit
9011f41d79
  1. 16
      bi/widget.js
  2. 2
      demo/js/widget/slider/demo.slider.js
  3. 16
      dist/bundle.js
  4. 2
      dist/demo.js
  5. 16
      dist/widget.js
  6. 16
      src/widget/slider/slider.js

16
bi/widget.js

@ -15080,7 +15080,7 @@ BI.SliderButton = BI.inherit(BI.Widget, {
BI.shortcut("bi.slider_button", BI.SliderButton);/**
* Created by Urthur on 2017/9/4.
*/
BI.Slider = BI.inherit(BI.Widget, {
BI.SliderNormal = BI.inherit(BI.Widget, {
_constant: {
HEIGHT: 28,
SLIDER_WIDTH_HALF: 10,
@ -15090,7 +15090,7 @@ BI.Slider = BI.inherit(BI.Widget, {
},
_defaultConfig: function () {
return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-slider",
min: 10,
max: 50
@ -15098,7 +15098,7 @@ BI.Slider = BI.inherit(BI.Widget, {
},
_init: function () {
BI.Slider.superclass._init.apply(this, arguments);
BI.SliderNormal.superclass._init.apply(this, arguments);
var self = this;
var c = this._constant, o = this.options;
this.enable = false;
@ -15127,13 +15127,13 @@ BI.Slider = BI.inherit(BI.Widget, {
var v = self._getValueByPercent(significantPercent);
self.value = BI.parseInt(v) + 1;
self.slider.setValue(self.getValue());
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
},
stop: function (e, ui) {
var percent = (ui.position.left) * 100 / (self._getRightTrackLength());
var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderPosition(significantPercent);
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
}
});
var sliderVertical = BI.createWidget({
@ -15167,7 +15167,7 @@ BI.Slider = BI.inherit(BI.Widget, {
var v = self._getValueByPercent(significantPercent);
self.value = BI.parseInt(v);
self.slider.setValue(self.getValue());
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
}
});
@ -15276,8 +15276,8 @@ BI.Slider = BI.inherit(BI.Widget, {
}
});
BI.Slider.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.slider", BI.Slider);/**
BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.slider", BI.SliderNormal);/**
* 可以单选多选切换的树
*
* Created by GUY on 2015/12/21.

2
demo/js/widget/slider/demo.slider.js

@ -34,7 +34,7 @@ Demo.Slider = BI.inherit(BI.Widget, {
});
this.slider.setValue("30");
this.slider.on(BI.Slider.EVENT_CHANGE, function () {
this.slider.on(BI.SliderNormal.EVENT_CHANGE, function () {
console.log(this.getValue());
})
}

16
dist/bundle.js vendored

@ -92136,7 +92136,7 @@ BI.SliderButton = BI.inherit(BI.Widget, {
BI.shortcut("bi.slider_button", BI.SliderButton);/**
* Created by Urthur on 2017/9/4.
*/
BI.Slider = BI.inherit(BI.Widget, {
BI.SliderNormal = BI.inherit(BI.Widget, {
_constant: {
HEIGHT: 28,
SLIDER_WIDTH_HALF: 10,
@ -92146,7 +92146,7 @@ BI.Slider = BI.inherit(BI.Widget, {
},
_defaultConfig: function () {
return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-slider",
min: 10,
max: 50
@ -92154,7 +92154,7 @@ BI.Slider = BI.inherit(BI.Widget, {
},
_init: function () {
BI.Slider.superclass._init.apply(this, arguments);
BI.SliderNormal.superclass._init.apply(this, arguments);
var self = this;
var c = this._constant, o = this.options;
this.enable = false;
@ -92183,13 +92183,13 @@ BI.Slider = BI.inherit(BI.Widget, {
var v = self._getValueByPercent(significantPercent);
self.value = BI.parseInt(v) + 1;
self.slider.setValue(self.getValue());
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
},
stop: function (e, ui) {
var percent = (ui.position.left) * 100 / (self._getRightTrackLength());
var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderPosition(significantPercent);
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
}
});
var sliderVertical = BI.createWidget({
@ -92223,7 +92223,7 @@ BI.Slider = BI.inherit(BI.Widget, {
var v = self._getValueByPercent(significantPercent);
self.value = BI.parseInt(v);
self.slider.setValue(self.getValue());
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
}
});
@ -92332,8 +92332,8 @@ BI.Slider = BI.inherit(BI.Widget, {
}
});
BI.Slider.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.slider", BI.Slider);/**
BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.slider", BI.SliderNormal);/**
* 可以单选多选切换的树
*
* Created by GUY on 2015/12/21.

2
dist/demo.js vendored

@ -8435,7 +8435,7 @@ Demo.Slider = BI.inherit(BI.Widget, {
});
this.slider.setValue("30");
this.slider.on(BI.Slider.EVENT_CHANGE, function () {
this.slider.on(BI.SliderNormal.EVENT_CHANGE, function () {
console.log(this.getValue());
})
}

16
dist/widget.js vendored

@ -15080,7 +15080,7 @@ BI.SliderButton = BI.inherit(BI.Widget, {
BI.shortcut("bi.slider_button", BI.SliderButton);/**
* Created by Urthur on 2017/9/4.
*/
BI.Slider = BI.inherit(BI.Widget, {
BI.SliderNormal = BI.inherit(BI.Widget, {
_constant: {
HEIGHT: 28,
SLIDER_WIDTH_HALF: 10,
@ -15090,7 +15090,7 @@ BI.Slider = BI.inherit(BI.Widget, {
},
_defaultConfig: function () {
return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-slider",
min: 10,
max: 50
@ -15098,7 +15098,7 @@ BI.Slider = BI.inherit(BI.Widget, {
},
_init: function () {
BI.Slider.superclass._init.apply(this, arguments);
BI.SliderNormal.superclass._init.apply(this, arguments);
var self = this;
var c = this._constant, o = this.options;
this.enable = false;
@ -15127,13 +15127,13 @@ BI.Slider = BI.inherit(BI.Widget, {
var v = self._getValueByPercent(significantPercent);
self.value = BI.parseInt(v) + 1;
self.slider.setValue(self.getValue());
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
},
stop: function (e, ui) {
var percent = (ui.position.left) * 100 / (self._getRightTrackLength());
var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderPosition(significantPercent);
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
}
});
var sliderVertical = BI.createWidget({
@ -15167,7 +15167,7 @@ BI.Slider = BI.inherit(BI.Widget, {
var v = self._getValueByPercent(significantPercent);
self.value = BI.parseInt(v);
self.slider.setValue(self.getValue());
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
}
});
@ -15276,8 +15276,8 @@ BI.Slider = BI.inherit(BI.Widget, {
}
});
BI.Slider.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.slider", BI.Slider);/**
BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.slider", BI.SliderNormal);/**
* 可以单选多选切换的树
*
* Created by GUY on 2015/12/21.

16
src/widget/slider/slider.js

@ -1,7 +1,7 @@
/**
* Created by Urthur on 2017/9/4.
*/
BI.Slider = BI.inherit(BI.Widget, {
BI.SliderNormal = BI.inherit(BI.Widget, {
_constant: {
HEIGHT: 28,
SLIDER_WIDTH_HALF: 10,
@ -11,7 +11,7 @@ BI.Slider = BI.inherit(BI.Widget, {
},
_defaultConfig: function () {
return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-slider",
min: 10,
max: 50
@ -19,7 +19,7 @@ BI.Slider = BI.inherit(BI.Widget, {
},
_init: function () {
BI.Slider.superclass._init.apply(this, arguments);
BI.SliderNormal.superclass._init.apply(this, arguments);
var self = this;
var c = this._constant, o = this.options;
this.enable = false;
@ -48,13 +48,13 @@ BI.Slider = BI.inherit(BI.Widget, {
var v = self._getValueByPercent(significantPercent);
self.value = BI.parseInt(v) + 1;
self.slider.setValue(self.getValue());
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
},
stop: function (e, ui) {
var percent = (ui.position.left) * 100 / (self._getRightTrackLength());
var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderPosition(significantPercent);
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
}
});
var sliderVertical = BI.createWidget({
@ -88,7 +88,7 @@ BI.Slider = BI.inherit(BI.Widget, {
var v = self._getValueByPercent(significantPercent);
self.value = BI.parseInt(v);
self.slider.setValue(self.getValue());
self.fireEvent(BI.Slider.EVENT_CHANGE);
self.fireEvent(BI.SliderNormal.EVENT_CHANGE);
}
});
@ -197,5 +197,5 @@ BI.Slider = BI.inherit(BI.Widget, {
}
});
BI.Slider.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.slider", BI.Slider);
BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.slider", BI.SliderNormal);
Loading…
Cancel
Save