|
|
|
@ -91,13 +91,21 @@
|
|
|
|
|
|
|
|
|
|
// 获取缩放倍数,原模板宽高
|
|
|
|
|
function getScaleBounds() { |
|
|
|
|
var widgts = BI.designConfigure.widgets, |
|
|
|
|
var widgets = BI.designConfigure.widgets, |
|
|
|
|
layoutRatio = BI.designConfigure.layoutRatio, |
|
|
|
|
freeLayoutRatio = BI.designConfigure.freeLayoutRatio, |
|
|
|
|
freeWidgets = BI.designConfigure.freeWidgetIds; |
|
|
|
|
|
|
|
|
|
if (Object.keys(widgets).length === 0) { |
|
|
|
|
return { |
|
|
|
|
scale: 1, |
|
|
|
|
width: html.clientWidth, |
|
|
|
|
height: html.clientHeight |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
var left = null, right = null, top = null, bottom = null, |
|
|
|
|
freeLeft = null, freeRight = null, freeTop = null, freeBottom = null; |
|
|
|
|
BI.each(widgts, function (wId, widget) { |
|
|
|
|
BI.each(widgets, function (wId, widget) { |
|
|
|
|
var bounds = widget.bounds || {}; |
|
|
|
|
if (BI.contains(freeWidgets, wId)) { |
|
|
|
|
freeLeft = BI.isNull(freeLeft) ? bounds.left : Math.min(freeLeft, bounds.left); |
|
|
|
|