|
|
@ -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 size = self._calculateSize(); |
|
|
|
var W = $("body").width(), H = $("body").height(); |
|
|
|
var W = $("body").width(), H = $("body").height(); |
|
|
|
if (ui.position.left + o.width > W) { |
|
|
|
self.startX += deltaX; |
|
|
|
ui.position.left = W - o.width; |
|
|
|
self.startY += deltaY; |
|
|
|
} |
|
|
|
self.element.css({ |
|
|
|
if (ui.position.top + o.height > H) { |
|
|
|
left: BI.clamp(self.startX, 0, W - size.width) + "px", |
|
|
|
ui.position.top = H - o.height; |
|
|
|
top: BI.clamp(self.startY, 0, H - size.height) + "px" |
|
|
|
} |
|
|
|
}); |
|
|
|
if (ui.position.left < 0) { |
|
|
|
|
|
|
|
ui.position.left = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (ui.position.top < 0) { |
|
|
|
|
|
|
|
ui.position.top = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// BI-12134 没有什么特别好的方法
|
|
|
|
// BI-12134 没有什么特别好的方法
|
|
|
|
BI.Resizers._resize(); |
|
|
|
BI.Resizers._resize(); |
|
|
|
} |
|
|
|
}, function () { |
|
|
|
}); |
|
|
|
self.tracker.releaseMouseMoves(); |
|
|
|
|
|
|
|
}, window); |
|
|
|
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 = {}; |
|
|
@ -93839,7 +93848,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; |
|
|
@ -106712,7 +106721,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; |
|
|
@ -107023,7 +107032,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; |
|
|
@ -107288,7 +107297,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; |
|
|
|