Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20605] Windows: view.center not working

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-03-25T16:32:02.000+0000
Affected Version/sRelease 5.2.0
Fix Version/sRelease 5.3.0
ComponentsWindows
Labelscenter, qe-5.3.0, view, windows_phone
ReporterZakhar Zhuravlev
AssigneeKota Iguchi
Created2016-03-18T14:42:39.000+0000
Updated2016-06-15T09:49:20.000+0000

Description

Windows: view.center not working *Steps to reproduce:* - Create an alloy project with the reporter's provided test case - Run the app - Change the value of the x and y axis of the center and run again - Observe that no change takes effect It's affected 5.2.0 *index.js:*
function onClick(e) {
    $.testView.center = {
    	x: '50dp',
    	y: '50dp'
    };
}
$.win.open();
*index.xml:* {noformat} {noformat}

Comments

  1. Kota Iguchi 2016-03-25

    https://github.com/appcelerator/titanium_mobile_windows/pull/595
  2. Harry Bryant 2016-04-14

    Verified as fixed, Using sample code provided in PR, view.center appropriately centers the view based on the "onClick" position. Tested on: Windows 10 Pro Windows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE) Appc Studio: 4.6.0.201604141457 Ti SDK: 5.3.0.v20160414094426 Appc NPM: 4.2.5-1 Appc Core: 5.3.0-12 Node: v4.4.2 *Closing Ticket.*
  3. Zakhar Zhuravlev 2016-06-15

    Problem isn't fixed!!! Now after tap on view it jumps to left top corner, but not to passed coordinates. I checked with this values: { x: '150dp', y: '150dp' } { x: 150, y: 150 } { x: '75%', y: '75%' }

JSON Source