[TIMOB-5122] Add a member function to View called 'convertPointToView'
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-09-02T12:58:21.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | Sprint 2011-35, Release 1.8.0 |
Components | Android |
Labels | merged-v8, module, module_views, stage, views |
Reporter | Reggie Seagraves |
Assignee | Marshall Culpepper |
Created | 2011-08-26T11:46:45.000+0000 |
Updated | 2012-02-08T16:35:46.000+0000 |
Description
- name: convertPointToView
description: translates a point from the receiver's view coordinate system to another view's coordinate system. If both views
are connected in the native view heirarchies, will return the converted point in the form of an object with x and y properties.
If either view is not in the view heirarchy, a null is returned. Keep in mind that views may be removed from the view heirarchy
if their window is blurred or if the view is offscreen (such as in some situations with ).
returns:
type: [Object, null]
parameters:
- name: point
description: an object with properties of x and y describing a point within the receiver's coordinate system. If this argument is missing an x or y property, or the properties can not be converted into numbers, an exception will be raised.
type: Object
- name: destinationView
description: the view whose coordinate system to which the point will be converted. If this argument is not a view, an exception will be raised.
type: Titanium.UI.View
To test this, simply run the "ui" test suite in Drillbit, and make sure the
convertPointToView
test passes.Please ensure that the
ui
test passes for both iOS, and Android, and also run the KitchenSink test on Android, iOS simulator AND iOS device: * Base UI > Views > Point Conversion The iPhone Simulator has the 3rd "magenta" view click event disabled due the known exception bug. Also make sure to validate the TDoc APIs:Review/Merge/Coordination
Tested with version=1.9.0 module_apiversion=2 timestamp=02/08/12 14:59 githash=d577936 on iphone simulator 5.0 and android Nexus One 2.2.2 on v8/rhino