mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
case statements fix
This commit is contained in:
@ -720,7 +720,8 @@ export class View extends ProxyObject implements definition.View {
|
||||
childTop = top + marginTop * density;
|
||||
break;
|
||||
|
||||
case enums.VerticalAlignment.center || enums.VerticalAlignment.middle:
|
||||
case enums.VerticalAlignment.center:
|
||||
case enums.VerticalAlignment.middle:
|
||||
childTop = top + (bottom - top - childHeight + (marginTop - marginBottom) * density) / 2;
|
||||
break;
|
||||
|
||||
|
@ -586,7 +586,8 @@ export class ViewStyler implements style.Styler {
|
||||
gravity |= android.view.Gravity.TOP;
|
||||
break;
|
||||
|
||||
case enums.VerticalAlignment.center || enums.VerticalAlignment.middle:
|
||||
case enums.VerticalAlignment.center:
|
||||
case enums.VerticalAlignment.middle:
|
||||
gravity |= android.view.Gravity.CENTER_VERTICAL;
|
||||
break;
|
||||
|
||||
|
@ -110,7 +110,8 @@ export class StackLayout extends common.StackLayout {
|
||||
var childRight = right - left - paddingRight;
|
||||
|
||||
switch (this.verticalAlignment) {
|
||||
case VerticalAlignment.center || VerticalAlignment.middle:
|
||||
case VerticalAlignment.center:
|
||||
case VerticalAlignment.middle:
|
||||
childTop = (bottom - top - this._totalLength) / 2 + paddingTop - paddingBottom;
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user