Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26508] Windows: Setting undefined should clear layout value

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-11-20T02:00:15.000+0000
Affected Version/sRelease 7.5.0
Fix Version/sRelease 8.0.0
ComponentsWindows
Labelsparity
ReporterKota Iguchi
AssigneeKota Iguchi
Created2018-11-01T08:52:47.000+0000
Updated2018-11-20T11:39:29.000+0000

Description

Setting undefined to layout property should "clear" layout value. For instance, Setting both left and top disables center property (TIMOB-26507) but we should be able to enable center property again by setting undefined for left and top properties.
var win = Ti.UI.createWindow();

var view1 = Ti.UI.createView({
    width: 100, height: 100,
    top: 100, left: 100,
    backgroundColor: 'blue',
});

win.addEventListener('click', function (e) {
    view1.top  = undefined;
    view1.left = undefined;
    view1.center = { x: e.x, y:e.y };
});

win.add(view1);
win.open();
Expected: The blue view should move to where you click.

Comments

  1. Kota Iguchi 2018-11-01

    https://github.com/appcelerator/titanium_mobile_windows/pull/1302
  2. Samir Mohammed 2018-11-19

    FR Passed. Waiting on Jenkins build.
  3. Samir Mohammed 2018-11-20

    *Closing ticket.* Verified fix in SDK version 8.0.0.v20181120013506. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile_windows/pull/1302

JSON Source