You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
class AnchorLayoutOptions extends LayoutOptions {
constructor(options) {
super(options.width, options.height);
this.anchorLeft = options.anchorLeft || 0;
this.anchorTop = options.anchorTop || 0;
this.anchorBottom = options.anchorBottom || 0;
this.anchorRight = options.anchorRight || 0;
this.horizontalAlign = options.horizontalAlign || ALIGN.LEFT;
this.verticalAlign = options.verticalAlign || ALIGN.CENTER;
}
because ALIGN.TOP value is 0, so when i set ALIGN.TOP to verticalAlign, here will be change to ALIGN.CENTER.
here is work.
class AnchorLayoutOptions extends LayoutOptions {
constructor(options) {
super(options.width, options.height);
this.anchorLeft = options.anchorLeft || 0;
this.anchorTop = options.anchorTop || 0;
this.anchorBottom = options.anchorBottom || 0;
this.anchorRight = options.anchorRight || 0;
if (options.horizontalAlign === 0) {
this.horizontalAlign = 0;
} else {
this.horizontalAlign = options.horizontalAlign || ALIGN.LEFT;
}
}
在设置ALIGN.TOP时,由于ALIGN.TOP为0,因此,会将verticalAlign改为ALIGN.CENTER
The text was updated successfully, but these errors were encountered: