2014.11.20 soui Important update: Swindow layout Properties Pos2type replaced by offset.

Source: Internet
Author: User

The original Soui layout uses the Pos2type property to define the offset of the POS with only 2 values, mainly for the offset of the window position when the window size needs to be dynamically computed (such as horizontal, vertical centering, etc.).

Pos2type can define 9 reference points: Center, Lefttop, Leftmid, Leftbottom,midtop,midbottom,righttop,rightmid,rightbottom.

The new version of the Offset property can define the offset in X, y two directions: offset = "Xoctave,yoctave", Xoctave, Yoctave represents a multiple of the offset window size in the x, y direction, typically [ -1,0] for a decimal (float), Of course it can be over this range.

The following table shows the offset property of the corresponding original Pos2type property:

Pos2type Offset
Center -0.5,-0.5
Lefttop 0,0
Leftmid 0,-0.5
Leftbottom 0,-1
Midtop -0.5,0
Midbottom -0.5,-1
Righttop -1,0
Rightmid -1,-0.5
Rightbottom -1,-1

As can be seen from the above table, the original Pos2type property can only be a multiple of 0.5, the new offset property does not have this limit.

And the original Pos2type property is valid only if the POS attribute contains only two values, and the new offset property is valid regardless of whether the POS attribute has a value.

Of course the update may bring some work synchronized with the new version, and if the product has been developed it is not recommended to upgrade.

2014.11.20 soui Important update: Swindow layout Properties Pos2type replaced by offset.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.