diff --git a/src/core/wrapper/layout/layout.absolute.js b/src/core/wrapper/layout/layout.absolute.js index 991eb825c..ee5dde1e7 100644 --- a/src/core/wrapper/layout/layout.absolute.js +++ b/src/core/wrapper/layout/layout.absolute.js @@ -72,10 +72,10 @@ BI.AbsoluteLayout = BI.inherit(BI.Layout, { } if (BI.isNotNull(item.width)) { - w.element.css({width: item.width / BI.pixRatio + BI.pixUnit}); + w.element.css({width: BI.isNumber(item.width) ? item.width / BI.pixRatio + BI.pixUnit : item.width}); } if (BI.isNotNull(item.height)) { - w.element.css({height: item.height / BI.pixRatio + BI.pixUnit}); + w.element.css({height: BI.isNumber(item.height) ? item.height / BI.pixRatio + BI.pixUnit : item.height}); } w.element.css({position: "absolute"}); return w; diff --git a/src/core/wrapper/layout/layout.adaptive.js b/src/core/wrapper/layout/layout.adaptive.js index b27aac7c9..4b679debe 100644 --- a/src/core/wrapper/layout/layout.adaptive.js +++ b/src/core/wrapper/layout/layout.adaptive.js @@ -72,10 +72,10 @@ BI.AdaptiveLayout = BI.inherit(BI.Layout, { } if (BI.isNotNull(item.width)) { - w.element.css({width: item.width / BI.pixRatio + BI.pixUnit}); + w.element.css({width: BI.isNumber(item.width) ? item.width / BI.pixRatio + BI.pixUnit : item.width}); } if (BI.isNotNull(item.height)) { - w.element.css({height: item.height / BI.pixRatio + BI.pixUnit}); + w.element.css({height: BI.isNumber(item.height) ? item.height / BI.pixRatio + BI.pixUnit : item.height}); } return w; },