Browse Source

Merge pull request #929 in VISUAL/fineui from ~GUY/fineui:master to master

* commit 'c8c3a2631d20bd10d0450133d3197264bfa7f8c8':
  bugfix
es6
guy 6 years ago
parent
commit
535dd5d9fb
  1. 30
      dist/2.0/fineui.ie.js
  2. 2
      dist/2.0/fineui.ie.min.js
  3. 30
      dist/2.0/fineui.js
  4. 2
      dist/2.0/fineui.min.js
  5. 30
      dist/bundle.ie.js
  6. 2
      dist/bundle.ie.min.js
  7. 30
      dist/bundle.js
  8. 2
      dist/bundle.min.js
  9. 30
      dist/core.js
  10. 30
      dist/fineui.ie.js
  11. 2
      dist/fineui.ie.min.js
  12. 30
      dist/fineui.js
  13. 2
      dist/fineui.min.js
  14. 2
      dist/utils.min.js
  15. 30
      src/core/platform/web/dom.js

30
dist/2.0/fineui.ie.js vendored

@ -19460,7 +19460,7 @@ BI.prepares.push(function () {
}); });
}); });
var fromChildren = fromElement.children(), toChildren = toElement.children(); var fromChildren = fromElement.children(), toChildren = toElement.children();
if(fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("不匹配");
} }
BI.each(fromChildren, function (i, child) { BI.each(fromChildren, function (i, child) {
@ -19714,14 +19714,14 @@ BI.prepares.push(function () {
return tempValue; return tempValue;
}, },
rgba2rgb: function (rgbColour, BGcolor) { rgba2rgb: function (rgbColor, bgColor) {
if (BI.isNull(BGcolor)) { if (BI.isNull(bgColor)) {
BGcolor = 1; bgColor = 1;
} }
if (rgbColour.substr(0, 4) != "rgba") { if (rgbColor.substr(0, 4) != "rgba") {
return ""; return "";
} }
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g); var rgbValues = rgbColor.match(/\d+(\.\d+)?/g);
if (rgbValues.length < 4) { if (rgbValues.length < 4) {
return ""; return "";
} }
@ -19730,9 +19730,9 @@ BI.prepares.push(function () {
var B = BI.parseFloat(rgbValues[2]); var B = BI.parseFloat(rgbValues[2]);
var A = BI.parseFloat(rgbValues[3]); var A = BI.parseFloat(rgbValues[3]);
return "rgb(" + Math.floor(255 * (BGcolor * (1 - A )) + R * A) + "," + return "rgb(" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + G * A) + "," + Math.floor(255 * (bgColor * (1 - A)) + G * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + B * A) + ")"; Math.floor(255 * (bgColor * (1 - A)) + B * A) + ")";
} }
}); });
@ -19769,7 +19769,8 @@ BI.prepares.push(function () {
}, },
isRightSpaceEnough: function (combo, popup, extraWidth) { isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width; return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
}, },
@ -19778,7 +19779,8 @@ BI.prepares.push(function () {
}, },
isBottomSpaceEnough: function (combo, popup, extraHeight) { isBottomSpaceEnough: function (combo, popup, extraHeight) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height; return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;
}, },
@ -19793,7 +19795,8 @@ BI.prepares.push(function () {
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
@ -19863,7 +19866,8 @@ BI.prepares.push(function () {
}, },
getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) { getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {
var popupBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {
return BI.DOM.getTopPosition(combo, popup, extraHeight); return BI.DOM.getTopPosition(combo, popup, extraHeight);
} }

2
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/2.0/fineui.js vendored

@ -19460,7 +19460,7 @@ BI.prepares.push(function () {
}); });
}); });
var fromChildren = fromElement.children(), toChildren = toElement.children(); var fromChildren = fromElement.children(), toChildren = toElement.children();
if(fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("不匹配");
} }
BI.each(fromChildren, function (i, child) { BI.each(fromChildren, function (i, child) {
@ -19714,14 +19714,14 @@ BI.prepares.push(function () {
return tempValue; return tempValue;
}, },
rgba2rgb: function (rgbColour, BGcolor) { rgba2rgb: function (rgbColor, bgColor) {
if (BI.isNull(BGcolor)) { if (BI.isNull(bgColor)) {
BGcolor = 1; bgColor = 1;
} }
if (rgbColour.substr(0, 4) != "rgba") { if (rgbColor.substr(0, 4) != "rgba") {
return ""; return "";
} }
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g); var rgbValues = rgbColor.match(/\d+(\.\d+)?/g);
if (rgbValues.length < 4) { if (rgbValues.length < 4) {
return ""; return "";
} }
@ -19730,9 +19730,9 @@ BI.prepares.push(function () {
var B = BI.parseFloat(rgbValues[2]); var B = BI.parseFloat(rgbValues[2]);
var A = BI.parseFloat(rgbValues[3]); var A = BI.parseFloat(rgbValues[3]);
return "rgb(" + Math.floor(255 * (BGcolor * (1 - A )) + R * A) + "," + return "rgb(" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + G * A) + "," + Math.floor(255 * (bgColor * (1 - A)) + G * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + B * A) + ")"; Math.floor(255 * (bgColor * (1 - A)) + B * A) + ")";
} }
}); });
@ -19769,7 +19769,8 @@ BI.prepares.push(function () {
}, },
isRightSpaceEnough: function (combo, popup, extraWidth) { isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width; return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
}, },
@ -19778,7 +19779,8 @@ BI.prepares.push(function () {
}, },
isBottomSpaceEnough: function (combo, popup, extraHeight) { isBottomSpaceEnough: function (combo, popup, extraHeight) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height; return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;
}, },
@ -19793,7 +19795,8 @@ BI.prepares.push(function () {
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
@ -19863,7 +19866,8 @@ BI.prepares.push(function () {
}, },
getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) { getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {
var popupBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {
return BI.DOM.getTopPosition(combo, popup, extraHeight); return BI.DOM.getTopPosition(combo, popup, extraHeight);
} }

2
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/bundle.ie.js vendored

@ -19460,7 +19460,7 @@ BI.prepares.push(function () {
}); });
}); });
var fromChildren = fromElement.children(), toChildren = toElement.children(); var fromChildren = fromElement.children(), toChildren = toElement.children();
if(fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("不匹配");
} }
BI.each(fromChildren, function (i, child) { BI.each(fromChildren, function (i, child) {
@ -19714,14 +19714,14 @@ BI.prepares.push(function () {
return tempValue; return tempValue;
}, },
rgba2rgb: function (rgbColour, BGcolor) { rgba2rgb: function (rgbColor, bgColor) {
if (BI.isNull(BGcolor)) { if (BI.isNull(bgColor)) {
BGcolor = 1; bgColor = 1;
} }
if (rgbColour.substr(0, 4) != "rgba") { if (rgbColor.substr(0, 4) != "rgba") {
return ""; return "";
} }
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g); var rgbValues = rgbColor.match(/\d+(\.\d+)?/g);
if (rgbValues.length < 4) { if (rgbValues.length < 4) {
return ""; return "";
} }
@ -19730,9 +19730,9 @@ BI.prepares.push(function () {
var B = BI.parseFloat(rgbValues[2]); var B = BI.parseFloat(rgbValues[2]);
var A = BI.parseFloat(rgbValues[3]); var A = BI.parseFloat(rgbValues[3]);
return "rgb(" + Math.floor(255 * (BGcolor * (1 - A )) + R * A) + "," + return "rgb(" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + G * A) + "," + Math.floor(255 * (bgColor * (1 - A)) + G * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + B * A) + ")"; Math.floor(255 * (bgColor * (1 - A)) + B * A) + ")";
} }
}); });
@ -19769,7 +19769,8 @@ BI.prepares.push(function () {
}, },
isRightSpaceEnough: function (combo, popup, extraWidth) { isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width; return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
}, },
@ -19778,7 +19779,8 @@ BI.prepares.push(function () {
}, },
isBottomSpaceEnough: function (combo, popup, extraHeight) { isBottomSpaceEnough: function (combo, popup, extraHeight) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height; return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;
}, },
@ -19793,7 +19795,8 @@ BI.prepares.push(function () {
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
@ -19863,7 +19866,8 @@ BI.prepares.push(function () {
}, },
getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) { getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {
var popupBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {
return BI.DOM.getTopPosition(combo, popup, extraHeight); return BI.DOM.getTopPosition(combo, popup, extraHeight);
} }

2
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/bundle.js vendored

@ -19460,7 +19460,7 @@ BI.prepares.push(function () {
}); });
}); });
var fromChildren = fromElement.children(), toChildren = toElement.children(); var fromChildren = fromElement.children(), toChildren = toElement.children();
if(fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("不匹配");
} }
BI.each(fromChildren, function (i, child) { BI.each(fromChildren, function (i, child) {
@ -19714,14 +19714,14 @@ BI.prepares.push(function () {
return tempValue; return tempValue;
}, },
rgba2rgb: function (rgbColour, BGcolor) { rgba2rgb: function (rgbColor, bgColor) {
if (BI.isNull(BGcolor)) { if (BI.isNull(bgColor)) {
BGcolor = 1; bgColor = 1;
} }
if (rgbColour.substr(0, 4) != "rgba") { if (rgbColor.substr(0, 4) != "rgba") {
return ""; return "";
} }
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g); var rgbValues = rgbColor.match(/\d+(\.\d+)?/g);
if (rgbValues.length < 4) { if (rgbValues.length < 4) {
return ""; return "";
} }
@ -19730,9 +19730,9 @@ BI.prepares.push(function () {
var B = BI.parseFloat(rgbValues[2]); var B = BI.parseFloat(rgbValues[2]);
var A = BI.parseFloat(rgbValues[3]); var A = BI.parseFloat(rgbValues[3]);
return "rgb(" + Math.floor(255 * (BGcolor * (1 - A )) + R * A) + "," + return "rgb(" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + G * A) + "," + Math.floor(255 * (bgColor * (1 - A)) + G * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + B * A) + ")"; Math.floor(255 * (bgColor * (1 - A)) + B * A) + ")";
} }
}); });
@ -19769,7 +19769,8 @@ BI.prepares.push(function () {
}, },
isRightSpaceEnough: function (combo, popup, extraWidth) { isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width; return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
}, },
@ -19778,7 +19779,8 @@ BI.prepares.push(function () {
}, },
isBottomSpaceEnough: function (combo, popup, extraHeight) { isBottomSpaceEnough: function (combo, popup, extraHeight) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height; return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;
}, },
@ -19793,7 +19795,8 @@ BI.prepares.push(function () {
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
@ -19863,7 +19866,8 @@ BI.prepares.push(function () {
}, },
getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) { getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {
var popupBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {
return BI.DOM.getTopPosition(combo, popup, extraHeight); return BI.DOM.getTopPosition(combo, popup, extraHeight);
} }

2
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/core.js vendored

@ -19460,7 +19460,7 @@ BI.prepares.push(function () {
}); });
}); });
var fromChildren = fromElement.children(), toChildren = toElement.children(); var fromChildren = fromElement.children(), toChildren = toElement.children();
if(fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("不匹配");
} }
BI.each(fromChildren, function (i, child) { BI.each(fromChildren, function (i, child) {
@ -19714,14 +19714,14 @@ BI.prepares.push(function () {
return tempValue; return tempValue;
}, },
rgba2rgb: function (rgbColour, BGcolor) { rgba2rgb: function (rgbColor, bgColor) {
if (BI.isNull(BGcolor)) { if (BI.isNull(bgColor)) {
BGcolor = 1; bgColor = 1;
} }
if (rgbColour.substr(0, 4) != "rgba") { if (rgbColor.substr(0, 4) != "rgba") {
return ""; return "";
} }
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g); var rgbValues = rgbColor.match(/\d+(\.\d+)?/g);
if (rgbValues.length < 4) { if (rgbValues.length < 4) {
return ""; return "";
} }
@ -19730,9 +19730,9 @@ BI.prepares.push(function () {
var B = BI.parseFloat(rgbValues[2]); var B = BI.parseFloat(rgbValues[2]);
var A = BI.parseFloat(rgbValues[3]); var A = BI.parseFloat(rgbValues[3]);
return "rgb(" + Math.floor(255 * (BGcolor * (1 - A )) + R * A) + "," + return "rgb(" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + G * A) + "," + Math.floor(255 * (bgColor * (1 - A)) + G * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + B * A) + ")"; Math.floor(255 * (bgColor * (1 - A)) + B * A) + ")";
} }
}); });
@ -19769,7 +19769,8 @@ BI.prepares.push(function () {
}, },
isRightSpaceEnough: function (combo, popup, extraWidth) { isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width; return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
}, },
@ -19778,7 +19779,8 @@ BI.prepares.push(function () {
}, },
isBottomSpaceEnough: function (combo, popup, extraHeight) { isBottomSpaceEnough: function (combo, popup, extraHeight) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height; return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;
}, },
@ -19793,7 +19795,8 @@ BI.prepares.push(function () {
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
@ -19863,7 +19866,8 @@ BI.prepares.push(function () {
}, },
getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) { getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {
var popupBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {
return BI.DOM.getTopPosition(combo, popup, extraHeight); return BI.DOM.getTopPosition(combo, popup, extraHeight);
} }

30
dist/fineui.ie.js vendored

@ -19705,7 +19705,7 @@ BI.prepares.push(function () {
}); });
}); });
var fromChildren = fromElement.children(), toChildren = toElement.children(); var fromChildren = fromElement.children(), toChildren = toElement.children();
if(fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("不匹配");
} }
BI.each(fromChildren, function (i, child) { BI.each(fromChildren, function (i, child) {
@ -19959,14 +19959,14 @@ BI.prepares.push(function () {
return tempValue; return tempValue;
}, },
rgba2rgb: function (rgbColour, BGcolor) { rgba2rgb: function (rgbColor, bgColor) {
if (BI.isNull(BGcolor)) { if (BI.isNull(bgColor)) {
BGcolor = 1; bgColor = 1;
} }
if (rgbColour.substr(0, 4) != "rgba") { if (rgbColor.substr(0, 4) != "rgba") {
return ""; return "";
} }
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g); var rgbValues = rgbColor.match(/\d+(\.\d+)?/g);
if (rgbValues.length < 4) { if (rgbValues.length < 4) {
return ""; return "";
} }
@ -19975,9 +19975,9 @@ BI.prepares.push(function () {
var B = BI.parseFloat(rgbValues[2]); var B = BI.parseFloat(rgbValues[2]);
var A = BI.parseFloat(rgbValues[3]); var A = BI.parseFloat(rgbValues[3]);
return "rgb(" + Math.floor(255 * (BGcolor * (1 - A )) + R * A) + "," + return "rgb(" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + G * A) + "," + Math.floor(255 * (bgColor * (1 - A)) + G * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + B * A) + ")"; Math.floor(255 * (bgColor * (1 - A)) + B * A) + ")";
} }
}); });
@ -20014,7 +20014,8 @@ BI.prepares.push(function () {
}, },
isRightSpaceEnough: function (combo, popup, extraWidth) { isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width; return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
}, },
@ -20023,7 +20024,8 @@ BI.prepares.push(function () {
}, },
isBottomSpaceEnough: function (combo, popup, extraHeight) { isBottomSpaceEnough: function (combo, popup, extraHeight) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height; return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;
}, },
@ -20038,7 +20040,8 @@ BI.prepares.push(function () {
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
@ -20108,7 +20111,8 @@ BI.prepares.push(function () {
}, },
getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) { getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {
var popupBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {
return BI.DOM.getTopPosition(combo, popup, extraHeight); return BI.DOM.getTopPosition(combo, popup, extraHeight);
} }

2
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/fineui.js vendored

@ -19705,7 +19705,7 @@ BI.prepares.push(function () {
}); });
}); });
var fromChildren = fromElement.children(), toChildren = toElement.children(); var fromChildren = fromElement.children(), toChildren = toElement.children();
if(fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("不匹配");
} }
BI.each(fromChildren, function (i, child) { BI.each(fromChildren, function (i, child) {
@ -19959,14 +19959,14 @@ BI.prepares.push(function () {
return tempValue; return tempValue;
}, },
rgba2rgb: function (rgbColour, BGcolor) { rgba2rgb: function (rgbColor, bgColor) {
if (BI.isNull(BGcolor)) { if (BI.isNull(bgColor)) {
BGcolor = 1; bgColor = 1;
} }
if (rgbColour.substr(0, 4) != "rgba") { if (rgbColor.substr(0, 4) != "rgba") {
return ""; return "";
} }
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g); var rgbValues = rgbColor.match(/\d+(\.\d+)?/g);
if (rgbValues.length < 4) { if (rgbValues.length < 4) {
return ""; return "";
} }
@ -19975,9 +19975,9 @@ BI.prepares.push(function () {
var B = BI.parseFloat(rgbValues[2]); var B = BI.parseFloat(rgbValues[2]);
var A = BI.parseFloat(rgbValues[3]); var A = BI.parseFloat(rgbValues[3]);
return "rgb(" + Math.floor(255 * (BGcolor * (1 - A )) + R * A) + "," + return "rgb(" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + G * A) + "," + Math.floor(255 * (bgColor * (1 - A)) + G * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + B * A) + ")"; Math.floor(255 * (bgColor * (1 - A)) + B * A) + ")";
} }
}); });
@ -20014,7 +20014,8 @@ BI.prepares.push(function () {
}, },
isRightSpaceEnough: function (combo, popup, extraWidth) { isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width; return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
}, },
@ -20023,7 +20024,8 @@ BI.prepares.push(function () {
}, },
isBottomSpaceEnough: function (combo, popup, extraHeight) { isBottomSpaceEnough: function (combo, popup, extraHeight) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height; return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;
}, },
@ -20038,7 +20040,8 @@ BI.prepares.push(function () {
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
@ -20108,7 +20111,8 @@ BI.prepares.push(function () {
}, },
getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) { getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {
var popupBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {
return BI.DOM.getTopPosition(combo, popup, extraHeight); return BI.DOM.getTopPosition(combo, popup, extraHeight);
} }

2
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

30
src/core/platform/web/dom.js

@ -22,7 +22,7 @@
}); });
}); });
var fromChildren = fromElement.children(), toChildren = toElement.children(); var fromChildren = fromElement.children(), toChildren = toElement.children();
if(fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("不匹配");
} }
BI.each(fromChildren, function (i, child) { BI.each(fromChildren, function (i, child) {
@ -276,14 +276,14 @@
return tempValue; return tempValue;
}, },
rgba2rgb: function (rgbColour, BGcolor) { rgba2rgb: function (rgbColor, bgColor) {
if (BI.isNull(BGcolor)) { if (BI.isNull(bgColor)) {
BGcolor = 1; bgColor = 1;
} }
if (rgbColour.substr(0, 4) != "rgba") { if (rgbColor.substr(0, 4) != "rgba") {
return ""; return "";
} }
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g); var rgbValues = rgbColor.match(/\d+(\.\d+)?/g);
if (rgbValues.length < 4) { if (rgbValues.length < 4) {
return ""; return "";
} }
@ -292,9 +292,9 @@
var B = BI.parseFloat(rgbValues[2]); var B = BI.parseFloat(rgbValues[2]);
var A = BI.parseFloat(rgbValues[3]); var A = BI.parseFloat(rgbValues[3]);
return "rgb(" + Math.floor(255 * (BGcolor * (1 - A )) + R * A) + "," + return "rgb(" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + G * A) + "," + Math.floor(255 * (bgColor * (1 - A)) + G * A) + "," +
Math.floor(255 * (BGcolor * (1 - A )) + B * A) + ")"; Math.floor(255 * (bgColor * (1 - A)) + B * A) + ")";
} }
}); });
@ -331,7 +331,8 @@
}, },
isRightSpaceEnough: function (combo, popup, extraWidth) { isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width; return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
}, },
@ -340,7 +341,8 @@
}, },
isBottomSpaceEnough: function (combo, popup, extraHeight) { isBottomSpaceEnough: function (combo, popup, extraHeight) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height; return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;
}, },
@ -355,7 +357,8 @@
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
@ -425,7 +428,8 @@
}, },
getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) { getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {
var popupBounds = popup.element.bounds(), windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); var popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {
return BI.DOM.getTopPosition(combo, popup, extraHeight); return BI.DOM.getTopPosition(combo, popup, extraHeight);
} }

Loading…
Cancel
Save