Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13764] TiAPI: After animating properties on a view, should those be updated in the view properties?

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-07-29T21:48:11.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.1.0
ComponentsTiAPI
Labelsn/a
ReporterIngo Muschenetz
AssigneeChristopher Williams
Created2013-05-06T20:17:31.000+0000
Updated2020-07-29T21:48:11.000+0000

Description

When a property is animated on a view, what does that property report when referenced directly? For example, given the following code snippet
var win = Ti.UI.createWindow({
		backgroundColor: '#fff'
	}),
	view = Ti.UI.createView({
		left: 10,
		top: 10,
		width: 200,
		height: 200,
		backgroundColor: '#f00'
	}),
	button = Ti.UI.createButton({
		title: 'animate'
	});

button.addEventListener('click', function() {
	view.animate({
		left: 100,
		duration: 500
	}, function () {
		setTimeout(function () {
			alert(view.left);
		}, 250);
	});
});

win.add(view);
win.add(button);
win.open();
Mobile Web reports 10, iOS reports 10, android reports 100, and BB reports 100. Whether or not these properties are updated needs to be properly defined, and parity reports filed for whichever two platforms do not conform

Comments

  1. Ivan Skugor 2013-05-08

    IMHO, only calculated dimension values should change (that is, dimension values returned from "getSize()" and "getRect()").
  2. Christopher Williams 2020-04-28

    https://github.com/appcelerator/titanium_mobile/pull/11666
  3. Satyam Sekhri 2020-05-21

    FR Passed.
  4. Satyam Sekhri 2020-07-29

    Verified on: Mac OS: 10.15.4 SDK: 9.1.0.v20200727104531 Appc CLI: 8.1.0-master.7 JDK: 11.0.4 Node: 10.17.0 Studio: 6.0.0.202005141803 Xcode: 12.0 beta Device: iOS simulator 14.0 beta, 13.5

JSON Source