|
|
@ -4761,6 +4761,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { |
|
|
|
toggle: true, |
|
|
|
toggle: true, |
|
|
|
direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
|
|
|
|
direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
|
|
|
|
isDefaultInit: false, |
|
|
|
isDefaultInit: false, |
|
|
|
|
|
|
|
destroyWhenHide: false, |
|
|
|
isNeedAdjustHeight: true,//是否需要高度调整
|
|
|
|
isNeedAdjustHeight: true,//是否需要高度调整
|
|
|
|
isNeedAdjustWidth: true, |
|
|
|
isNeedAdjustWidth: true, |
|
|
|
stopPropagation: false, |
|
|
|
stopPropagation: false, |
|
|
@ -4783,6 +4784,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { |
|
|
|
toggle: o.toggle, |
|
|
|
toggle: o.toggle, |
|
|
|
direction: o.direction, |
|
|
|
direction: o.direction, |
|
|
|
isDefaultInit: o.isDefaultInit, |
|
|
|
isDefaultInit: o.isDefaultInit, |
|
|
|
|
|
|
|
destroyWhenHide: o.destroyWhenHide, |
|
|
|
isNeedAdjustHeight: o.isNeedAdjustHeight, |
|
|
|
isNeedAdjustHeight: o.isNeedAdjustHeight, |
|
|
|
isNeedAdjustWidth: o.isNeedAdjustWidth, |
|
|
|
isNeedAdjustWidth: o.isNeedAdjustWidth, |
|
|
|
adjustLength: this._getAdjustLength(), |
|
|
|
adjustLength: this._getAdjustLength(), |
|
|
@ -4833,37 +4835,40 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_createTriangle: function (direction) { |
|
|
|
_createTriangle: function (direction) { |
|
|
|
var pos = {}, op = {}; |
|
|
|
var pos = {}, op = {}; |
|
|
|
var adjustLength = this._getAdjustLength(); |
|
|
|
var adjustLength = this.options.adjustLength; |
|
|
|
|
|
|
|
var offset = this.element.offset(); |
|
|
|
|
|
|
|
var left = offset.left, right = offset.left + this.element.outerWidth(); |
|
|
|
|
|
|
|
var top = offset.top, bottom = offset.top + this.element.outerHeight(); |
|
|
|
switch (direction) { |
|
|
|
switch (direction) { |
|
|
|
case "left": |
|
|
|
case "left": |
|
|
|
pos = { |
|
|
|
pos = { |
|
|
|
top: 0, |
|
|
|
top: top, |
|
|
|
bottom: 0, |
|
|
|
height: this.element.outerHeight(), |
|
|
|
left: -adjustLength |
|
|
|
left: left - adjustLength - this._const.TRIANGLE_LENGTH |
|
|
|
}; |
|
|
|
}; |
|
|
|
op = {width: this._const.TRIANGLE_LENGTH}; |
|
|
|
op = {width: this._const.TRIANGLE_LENGTH}; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "right": |
|
|
|
case "right": |
|
|
|
pos = { |
|
|
|
pos = { |
|
|
|
top: 0, |
|
|
|
top: top, |
|
|
|
bottom: 0, |
|
|
|
height: this.element.outerHeight(), |
|
|
|
right: -adjustLength |
|
|
|
left: right + adjustLength |
|
|
|
}; |
|
|
|
}; |
|
|
|
op = {width: this._const.TRIANGLE_LENGTH}; |
|
|
|
op = {width: this._const.TRIANGLE_LENGTH}; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "top": |
|
|
|
case "top": |
|
|
|
pos = { |
|
|
|
pos = { |
|
|
|
left: 0, |
|
|
|
left: left, |
|
|
|
right: 0, |
|
|
|
width: this.element.outerWidth(), |
|
|
|
top: -adjustLength |
|
|
|
top: top - adjustLength - this._const.TRIANGLE_LENGTH |
|
|
|
}; |
|
|
|
}; |
|
|
|
op = {height: this._const.TRIANGLE_LENGTH}; |
|
|
|
op = {height: this._const.TRIANGLE_LENGTH}; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "bottom": |
|
|
|
case "bottom": |
|
|
|
pos = { |
|
|
|
pos = { |
|
|
|
left: 0, |
|
|
|
left: left, |
|
|
|
right: 0, |
|
|
|
width: this.element.outerWidth(), |
|
|
|
bottom: -adjustLength |
|
|
|
top: bottom + adjustLength |
|
|
|
}; |
|
|
|
}; |
|
|
|
op = {height: this._const.TRIANGLE_LENGTH}; |
|
|
|
op = {height: this._const.TRIANGLE_LENGTH}; |
|
|
|
break; |
|
|
|
break; |
|
|
@ -4872,6 +4877,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { |
|
|
|
} |
|
|
|
} |
|
|
|
this.triangle = BI.createWidget(op, { |
|
|
|
this.triangle = BI.createWidget(op, { |
|
|
|
type: "bi.center_adapt", |
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
cls: "button-combo-triangle-wrapper", |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
type: "bi.layout", |
|
|
|
type: "bi.layout", |
|
|
|
cls: "bubble-combo-triangle-" + direction + " bi-high-light-border" |
|
|
|
cls: "bubble-combo-triangle-" + direction + " bi-high-light-border" |
|
|
|