Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5122] Add a member function to View called 'convertPointToView'

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-09-02T12:58:21.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-35, Release 1.8.0
ComponentsAndroid
Labelsmerged-v8, module, module_views, stage, views
ReporterReggie Seagraves
AssigneeMarshall Culpepper
Created2011-08-26T11:46:45.000+0000
Updated2012-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

Comments

  1. Marshall Culpepper 2011-08-31

    To test this, simply run the "ui" test suite in Drillbit, and make sure the convertPointToView test passes.
  2. Marshall Culpepper 2011-09-01

    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:
       $ ./apidoc/validate.py 
       
  3. Don Thorp 2011-09-02

    Review/Merge/Coordination
  4. Natalie Huynh 2012-02-08

    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

JSON Source