Browse Source

update

master
guy 7 years ago
parent
commit
7cefca3e9d
  1. 45
      dist/_fineui.min.js
  2. 49
      dist/base.js
  3. 65
      dist/bundle.js
  4. 88
      dist/bundle.min.js
  5. 45
      dist/fineui.min.js
  6. 16
      dist/widget.js
  7. 49
      src/base/layer/layer.popover.js
  8. 8
      src/widget/intervalslider/intervalslider.js
  9. 4
      src/widget/singleslider/singleslider.js
  10. 2
      src/widget/singleslider/singleslider.label.js
  11. 2
      src/widget/singleslider/singleslider.normal.js

45
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

49
dist/base.js vendored

@ -15328,31 +15328,30 @@ BI.Popover = BI.inherit(BI.Widget, {
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.element.draggable && this.element.draggable({ this.startX = 0;
handle: ".bi-message-title", this.startY = 0;
drag: function (e, ui) { this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) {
var W = $("body").width(), H = $("body").height(); var size = self._calculateSize();
if (ui.position.left + o.width > W) { var W = $("body").width(), H = $("body").height();
ui.position.left = W - o.width; self.startX += deltaX;
} self.startY += deltaY;
if (ui.position.top + o.height > H) { self.element.css({
ui.position.top = H - o.height; left: BI.clamp(self.startX, 0, W - size.width) + "px",
} top: BI.clamp(self.startY, 0, H - size.height) + "px"
if (ui.position.left < 0) { });
ui.position.left = 0; // BI-12134 没有什么特别好的方法
} BI.Resizers._resize();
if (ui.position.top < 0) { }, function () {
ui.position.top = 0; self.tracker.releaseMouseMoves();
} }, window);
// BI-12134 没有什么特别好的方法
BI.Resizers._resize();
}
});
var items = { var items = {
north: { north: {
el: { el: {
type: "bi.border", type: "bi.border",
cls: "bi-message-title bi-background", cls: "bi-message-title bi-background",
ref: function (_ref) {
self.dragger = _ref;
},
items: { items: {
center: { center: {
el: { el: {
@ -15425,6 +15424,16 @@ BI.Popover = BI.inherit(BI.Widget, {
}; };
}, },
mounted: function () {
var self = this;
this.dragger.element.mousedown(function (e) {
var pos = self.element.offset();
self.startX = pos.left;
self.startY = pos.top;
self.tracker.captureMouseMoves(e);
});
},
_calculateSize: function () { _calculateSize: function () {
var o = this.options; var o = this.options;
var size = {}; var size = {};

65
dist/bundle.js vendored

@ -50814,31 +50814,30 @@ BI.Popover = BI.inherit(BI.Widget, {
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.element.draggable && this.element.draggable({ this.startX = 0;
handle: ".bi-message-title", this.startY = 0;
drag: function (e, ui) { this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) {
var W = $("body").width(), H = $("body").height(); var size = self._calculateSize();
if (ui.position.left + o.width > W) { var W = $("body").width(), H = $("body").height();
ui.position.left = W - o.width; self.startX += deltaX;
} self.startY += deltaY;
if (ui.position.top + o.height > H) { self.element.css({
ui.position.top = H - o.height; left: BI.clamp(self.startX, 0, W - size.width) + "px",
} top: BI.clamp(self.startY, 0, H - size.height) + "px"
if (ui.position.left < 0) { });
ui.position.left = 0; // BI-12134 没有什么特别好的方法
} BI.Resizers._resize();
if (ui.position.top < 0) { }, function () {
ui.position.top = 0; self.tracker.releaseMouseMoves();
} }, window);
// BI-12134 没有什么特别好的方法
BI.Resizers._resize();
}
});
var items = { var items = {
north: { north: {
el: { el: {
type: "bi.border", type: "bi.border",
cls: "bi-message-title bi-background", cls: "bi-message-title bi-background",
ref: function (_ref) {
self.dragger = _ref;
},
items: { items: {
center: { center: {
el: { el: {
@ -50911,6 +50910,16 @@ BI.Popover = BI.inherit(BI.Widget, {
}; };
}, },
mounted: function () {
var self = this;
this.dragger.element.mousedown(function (e) {
var pos = self.element.offset();
self.startX = pos.left;
self.startY = pos.top;
self.tracker.captureMouseMoves(e);
});
},
_calculateSize: function () { _calculateSize: function () {
var o = this.options; var o = this.options;
var size = {}; var size = {};
@ -93837,7 +93846,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE); self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;
@ -94051,7 +94060,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision)); return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision));
} }
return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision)); return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision));
}, },
_getPercentByValue: function (v) { _getPercentByValue: function (v) {
@ -94081,7 +94090,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
} }
arr = pre.split("."); arr = pre.split(".");
return arr.length > 1 ? arr[1].length : 0; return arr.length > 1 ? arr[1].length : 0;
}, },
_assertValue: function (value) { _assertValue: function (value) {
@ -94099,7 +94108,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return {min: this.valueOne, max: this.valueTwo}; return {min: this.valueOne, max: this.valueTwo};
} }
return {min: this.valueTwo, max: this.valueOne}; return {min: this.valueTwo, max: this.valueOne};
}, },
setMinAndMax: function (v) { setMinAndMax: function (v) {
@ -106710,7 +106719,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSlider.EVENT_CHANGE); self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;
@ -106842,7 +106851,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
this.min = 0; this.min = 0;
this.max = 0; this.max = 0;
this._setBlueTrack(0); this._setBlueTrack(0);
}, },
populate: function () { populate: function () {
@ -107021,7 +107030,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;
@ -107286,7 +107295,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSlider.EVENT_CHANGE); self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;

88
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

45
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

16
dist/widget.js vendored

@ -7277,7 +7277,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE); self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;
@ -7491,7 +7491,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision)); return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision));
} }
return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision)); return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision));
}, },
_getPercentByValue: function (v) { _getPercentByValue: function (v) {
@ -7521,7 +7521,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
} }
arr = pre.split("."); arr = pre.split(".");
return arr.length > 1 ? arr[1].length : 0; return arr.length > 1 ? arr[1].length : 0;
}, },
_assertValue: function (value) { _assertValue: function (value) {
@ -7539,7 +7539,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return {min: this.valueOne, max: this.valueTwo}; return {min: this.valueOne, max: this.valueTwo};
} }
return {min: this.valueTwo, max: this.valueOne}; return {min: this.valueTwo, max: this.valueOne};
}, },
setMinAndMax: function (v) { setMinAndMax: function (v) {
@ -20150,7 +20150,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSlider.EVENT_CHANGE); self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;
@ -20282,7 +20282,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
this.min = 0; this.min = 0;
this.max = 0; this.max = 0;
this._setBlueTrack(0); this._setBlueTrack(0);
}, },
populate: function () { populate: function () {
@ -20461,7 +20461,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;
@ -20726,7 +20726,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSlider.EVENT_CHANGE); self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;

49
src/base/layer/layer.popover.js

@ -25,31 +25,30 @@ BI.Popover = BI.inherit(BI.Widget, {
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.element.draggable && this.element.draggable({ this.startX = 0;
handle: ".bi-message-title", this.startY = 0;
drag: function (e, ui) { this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) {
var W = $("body").width(), H = $("body").height(); var size = self._calculateSize();
if (ui.position.left + o.width > W) { var W = $("body").width(), H = $("body").height();
ui.position.left = W - o.width; self.startX += deltaX;
} self.startY += deltaY;
if (ui.position.top + o.height > H) { self.element.css({
ui.position.top = H - o.height; left: BI.clamp(self.startX, 0, W - size.width) + "px",
} top: BI.clamp(self.startY, 0, H - size.height) + "px"
if (ui.position.left < 0) { });
ui.position.left = 0; // BI-12134 没有什么特别好的方法
} BI.Resizers._resize();
if (ui.position.top < 0) { }, function () {
ui.position.top = 0; self.tracker.releaseMouseMoves();
} }, window);
// BI-12134 没有什么特别好的方法
BI.Resizers._resize();
}
});
var items = { var items = {
north: { north: {
el: { el: {
type: "bi.border", type: "bi.border",
cls: "bi-message-title bi-background", cls: "bi-message-title bi-background",
ref: function (_ref) {
self.dragger = _ref;
},
items: { items: {
center: { center: {
el: { el: {
@ -122,6 +121,16 @@ BI.Popover = BI.inherit(BI.Widget, {
}; };
}, },
mounted: function () {
var self = this;
this.dragger.element.mousedown(function (e) {
var pos = self.element.offset();
self.startX = pos.left;
self.startY = pos.top;
self.tracker.captureMouseMoves(e);
});
},
_calculateSize: function () { _calculateSize: function () {
var o = this.options; var o = this.options;
var size = {}; var size = {};

8
src/widget/intervalslider/intervalslider.js

@ -189,7 +189,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.IntervalSlider.EVENT_CHANGE); self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;
@ -403,7 +403,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision)); return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision));
} }
return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision)); return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision));
}, },
_getPercentByValue: function (v) { _getPercentByValue: function (v) {
@ -433,7 +433,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
} }
arr = pre.split("."); arr = pre.split(".");
return arr.length > 1 ? arr[1].length : 0; return arr.length > 1 ? arr[1].length : 0;
}, },
_assertValue: function (value) { _assertValue: function (value) {
@ -451,7 +451,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return {min: this.valueOne, max: this.valueTwo}; return {min: this.valueOne, max: this.valueTwo};
} }
return {min: this.valueTwo, max: this.valueOne}; return {min: this.valueTwo, max: this.valueOne};
}, },
setMinAndMax: function (v) { setMinAndMax: function (v) {

4
src/widget/singleslider/singleslider.js

@ -176,7 +176,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSlider.EVENT_CHANGE); self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;
@ -308,7 +308,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
this.min = 0; this.min = 0;
this.max = 0; this.max = 0;
this._setBlueTrack(0); this._setBlueTrack(0);
}, },
populate: function () { populate: function () {

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

@ -158,7 +158,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;

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

@ -123,7 +123,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, {
widget.element.removeClass("dragging"); widget.element.removeClass("dragging");
mouseMoveTracker.releaseMouseMoves(); mouseMoveTracker.releaseMouseMoves();
self.fireEvent(BI.SingleSlider.EVENT_CHANGE); self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}, document); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if(!widget.isEnabled()) {
return; return;

Loading…
Cancel
Save