File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -304,10 +304,10 @@ BaseLayout {
304
304
var w = this .width , h = this .height
305
305
306
306
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)
310
308
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
311
311
else if (x - cx <= 0 )
312
312
this .contentX = x
313
313
else if (x - cx + iw > w)
@@ -321,10 +321,10 @@ BaseLayout {
321
321
var w = this .width , h = this .height
322
322
323
323
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)
327
325
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
328
328
else if (y - cy <= 0 )
329
329
this .contentY = y
330
330
else if (y - cy + ih > h)
You can’t perform that action at this time.
0 commit comments