File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -304,10 +304,10 @@ BaseLayout {
304304 var w = this .width , h = this .height
305305
306306 var atCenter = x - w / 2 + iw / 2
307- if (center && this .contentWidth > w)
308- this .contentX = atCenter < 0 ? 0 : x > this .contentWidth - w / 2 - iw / 2 ? this .contentWidth - w : atCenter
309- else if (iw > w)
307+ if (iw > w)
310308 this .contentX = centerOversized? atCenter: x
309+ else if (center && this .contentWidth > w)
310+ this .contentX = atCenter < 0 ? 0 : x > this .contentWidth - w / 2 - iw / 2 ? this .contentWidth - w : atCenter
311311 else if (x - cx <= 0 )
312312 this .contentX = x
313313 else if (x - cx + iw > w)
@@ -321,10 +321,10 @@ BaseLayout {
321321 var w = this .width , h = this .height
322322
323323 var atCenter = y - h / 2 + ih / 2
324- if (center && this .contentHeight > h)
325- this .contentY = atCenter < 0 ? 0 : y > this .contentHeight - h / 2 - ih / 2 ? this .contentHeight - h : atCenter
326- else if (ih > h)
324+ if (ih > h)
327325 this .contentY = centerOversized? atCenter: y
326+ else if (center && this .contentHeight > h)
327+ this .contentY = atCenter < 0 ? 0 : y > this .contentHeight - h / 2 - ih / 2 ? this .contentHeight - h : atCenter
328328 else if (y - cy <= 0 )
329329 this .contentY = y
330330 else if (y - cy + ih > h)
You can’t perform that action at this time.
0 commit comments