[TIMOB-24406] Android: Unable to modify key of an Object property
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 6.0.0, Release 6.0.1 |
Fix Version/s | n/a |
Components | Android |
Labels | engReviewed, engSchedule, imageview |
Reporter | Yellowcube |
Assignee | Gary Mathews |
Created | 2017-02-16T04:55:28.000+0000 |
Updated | 2020-10-01T19:20:07.000+0000 |
Description
- Properties which are writable Objects such as
Point
and Font
cannot have their keys directly changed.
TEST CASE
var win = Ti.UI.createWindow({
title: 'TIMOB-24406',
backgroundColor: 'gray'
}),
iv = Ti.UI.createView({
backgroundColor: 'red',
width: '320',
height: '480',
center: {
x: (Ti.Platform.displayCaps.platformHeight / 2) + 'px',
y: (Ti.Platform.displayCaps.platformWidth / 2) + 'px'
}
});
win.addEventListener('click', function(e) {
iv.center.x = (Ti.Platform.displayCaps.platformHeight / 2) - e.x;
iv.center.y = (Ti.Platform.displayCaps.platformWidth / 2) - e.y;
//iv.center = {x: e.x, y: e.y}; // workaround
Ti.API.info('center.x: ' + iv.center.x);
Ti.API.info('center.y: ' + iv.center.y);
});
win.add(iv);
win.open();
Attachments
File | Date | Size |
---|---|---|
SDK 5.png | 2017-02-16T04:55:12.000+0000 | 13249 |
SDK 6.png | 2017-02-16T04:55:12.000+0000 | 41802 |
This is Android right? [~gmathews] Do we have this regression in 6.0.2 already? Might be worth checking in that timeline.
yes, this is happen in Android
master: https://github.com/appcelerator/titanium_mobile/pull/8850
Waiting for the conflicts to be resolved in the PR.