LayoutProxyProperty¶
Overview¶
A Property that takes the value of: - a LayoutProxy with the single connected Trail (if it exists) - null if there are zero or 2+ connected Trails between the two Nodes
When defined, this will provide a LayoutProxy for the leafNode within the rootNode's local coordinate frame. This will allow positioning the leafNode within the rootNode's coordinate frame (which is ONLY well-defined when there is exactly one trail between the two).
Thus, it will only be defined as a proxy if there is a unique trail between the two Nodes. This is needed for layout work, where often we'll need to provide a proxy IF this condition is true, and NO proxy if it's not (since layout would be ambiguous). E.g. for ManualConstraint, if a Node isn't connected to the root, there's nothing the constraint can do.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class LayoutProxyProperty¶
Constructor¶
new LayoutProxyProperty( rootNode : Node, leafNode : Node, providedOptions? : LayoutProxyPropertyOptions )¶
Instance Methods¶
dispose()¶
Type LayoutProxyPropertyOptions¶
- onTransformChange?: () => void
If provided, this will be called when the transform of the proxy changes
Source Code¶
See the source for LayoutProxyProperty.ts in the scenery repository.