From f995cbf1de194f0379d33406fe853a99ae35d21b Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Apr 2017 21:06:46 +0800 Subject: [PATCH] add --- bi/core.js | 5 +++-- docs/core.js | 5 +++-- src/core/func/dom.js | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/bi/core.js b/bi/core.js index fa4761ae1..39ec4f58d 100644 --- a/bi/core.js +++ b/bi/core.js @@ -16985,8 +16985,8 @@ BI.extend(jQuery, { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { extraWidth || (extraWidth = 0); extraHeight || (extraHeight = 0); - var maxHeight = $("body").bounds().height - extraHeight; - maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); + var bodyHeight = $("body").bounds().height - extraHeight; + var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight); popup.resetHeight && popup.resetHeight(maxHeight); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); switch (offsetStyle) { @@ -17009,6 +17009,7 @@ BI.extend(jQuery, { } break; } + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); return position; } });/** diff --git a/docs/core.js b/docs/core.js index 58670eef3..79ebe3be9 100644 --- a/docs/core.js +++ b/docs/core.js @@ -22511,8 +22511,8 @@ BI.extend(jQuery, { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { extraWidth || (extraWidth = 0); extraHeight || (extraHeight = 0); - var maxHeight = $("body").bounds().height - extraHeight; - maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); + var bodyHeight = $("body").bounds().height - extraHeight; + var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight); popup.resetHeight && popup.resetHeight(maxHeight); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); switch (offsetStyle) { @@ -22535,6 +22535,7 @@ BI.extend(jQuery, { } break; } + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); return position; } });/** diff --git a/src/core/func/dom.js b/src/core/func/dom.js index 6a6f2dc3b..95213e37c 100644 --- a/src/core/func/dom.js +++ b/src/core/func/dom.js @@ -553,8 +553,8 @@ BI.extend(jQuery, { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { extraWidth || (extraWidth = 0); extraHeight || (extraHeight = 0); - var maxHeight = $("body").bounds().height - extraHeight; - maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); + var bodyHeight = $("body").bounds().height - extraHeight; + var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight); popup.resetHeight && popup.resetHeight(maxHeight); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); switch (offsetStyle) { @@ -577,6 +577,7 @@ BI.extend(jQuery, { } break; } + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); return position; } }); \ No newline at end of file