Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24831] Windows: Layout does not seem to consider left and right properties

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-07-27T13:17:37.000+0000
Affected Version/sRelease 6.1.0
Fix Version/sRelease 6.2.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-06-15T15:56:17.000+0000
Updated2017-08-14T11:08:33.000+0000

Description

Description

In the code below, when setting the left or right property on the label, this does not seem to be taken into consideration by the layout engine and the label text will therefore overflow the edges of the screen, playing with the text property and the left and right properties demonstrates this
var _window = Ti.UI.createWindow();
var lbl = Ti.UI.createLabel({
    text:'number1. This is some long text. 2. This is some long text. 3. This is some long text. 4. This is some long text. 5. This is some long text. 6. This is some long text. 7. This is some long text. 8. This is some long text. 9. This is some long text. 10. This is some long text. 11. This is some long text. 12. This is some long text. 13. This is some long text. 14. This is some long text. 15. This is some long text. 16. This is some long text. 17. This is some long text. 18. This is some long text.',
    height:'auto',
    right: 10,
//  left:10,
    top:10,
    bottom:10
});
_window.add(lbl);
_window.open();

Steps to reproduce

Add the above to an existing app.js

Build for a windows target

Actual

Left and right are not taken into consideration

Expected

Left and right should be taken into consideration when laying them out

Comments

  1. Kota Iguchi 2017-06-29

    https://github.com/appcelerator/titanium_mobile_windows/pull/1025
  2. Ewan Harris 2017-07-27

    6_2_X backport merged in https://github.com/appcelerator/titanium_mobile_windows/pull/1048 Awaiting the build before closing
  3. Ewan Harris 2017-08-14

    Verified in 6.2.0.v20170811022027

JSON Source