guy 7 years ago
parent
commit
f995cbf1de
  1. 5
      bi/core.js
  2. 5
      docs/core.js
  3. 5
      src/core/func/dom.js

5
bi/core.js

@ -16985,8 +16985,8 @@ BI.extend(jQuery, {
getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) {
extraWidth || (extraWidth = 0); extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0); extraHeight || (extraHeight = 0);
var maxHeight = $("body").bounds().height - extraHeight; var bodyHeight = $("body").bounds().height - extraHeight;
maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight);
popup.resetHeight && popup.resetHeight(maxHeight); popup.resetHeight && popup.resetHeight(maxHeight);
var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']);
switch (offsetStyle) { switch (offsetStyle) {
@ -17009,6 +17009,7 @@ BI.extend(jQuery, {
} }
break; break;
} }
popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));
return position; return position;
} }
});/** });/**

5
docs/core.js

@ -22511,8 +22511,8 @@ BI.extend(jQuery, {
getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) {
extraWidth || (extraWidth = 0); extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0); extraHeight || (extraHeight = 0);
var maxHeight = $("body").bounds().height - extraHeight; var bodyHeight = $("body").bounds().height - extraHeight;
maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight);
popup.resetHeight && popup.resetHeight(maxHeight); popup.resetHeight && popup.resetHeight(maxHeight);
var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']);
switch (offsetStyle) { switch (offsetStyle) {
@ -22535,6 +22535,7 @@ BI.extend(jQuery, {
} }
break; break;
} }
popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));
return position; return position;
} }
});/** });/**

5
src/core/func/dom.js

@ -553,8 +553,8 @@ BI.extend(jQuery, {
getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) {
extraWidth || (extraWidth = 0); extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0); extraHeight || (extraHeight = 0);
var maxHeight = $("body").bounds().height - extraHeight; var bodyHeight = $("body").bounds().height - extraHeight;
maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight);
popup.resetHeight && popup.resetHeight(maxHeight); popup.resetHeight && popup.resetHeight(maxHeight);
var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']);
switch (offsetStyle) { switch (offsetStyle) {
@ -577,6 +577,7 @@ BI.extend(jQuery, {
} }
break; break;
} }
popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));
return position; return position;
} }
}); });
Loading…
Cancel
Save