-
Notifications
You must be signed in to change notification settings - Fork 30
Updated docs for Resize API and TextNode class #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
**IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. | ||
|
||
Changes the height to the given value and the width to the given height multiplied by the aspect ratio. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes the height to the given value and the width to the given height multiplied by the aspect ratio.
Is that the user-input value?
|
||
**IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. | ||
|
||
Changes the width to the given value and the height to the given width multiplied by the aspect ratio. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above
|
||
**IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. | ||
|
||
Resizes the node to cover a box with the given dimensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does given mean? User-input?
|
||
Resizes the node to cover a box with the given dimensions. | ||
|
||
If the node doesn't have a fixed aspect ratio then this will resize the node to the given width and height. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the node doesn't have a fixed aspect ratio, the resizeToCover() API will resize it to the given width and height.
|
||
To create new a single-frame piece of text, see [Editor.createText](Editor.md#createtext). APIs are not yet available to create | ||
multi-frame text flows. | ||
TextNode is an abstract base class representing text displayed in the scenegraph, regardless of whether it's a fully |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextNode is an abstract base class representing text displayed in the scenegraph, regardless of whether it's a fully
self-contained StandaloneTextNode or one ThreadedTextNode "frame" of multiple in a larger flow. The
APIs on TextNode and its TextContentModel allow you to generically work with text without knowing which subtypes you are dealing with.
@@ -77,6 +80,9 @@ even for an orphan node with no parent. | |||
|
|||
`Readonly`<[`Rect`](../interfaces/Rect.md)\> | |||
|
|||
Note: The bounding box of an orphaned TextNode may become different after it is placed on a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add all notes as an inline alert of variant info
@@ -94,6 +100,9 @@ The top-left corner of the bounding box corresponds to the visual top-left corne | |||
|
|||
`Readonly`<[`Rect`](../interfaces/Rect.md)\> | |||
|
|||
Note: The bounding box of the orphaned TextNode may be different from the bounding box of the node placed on a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add all notes as an inline alert of variant info.
<InlineAlert slots="text" />
multi-frame text flows. | ||
TextNode is an abstract base class representing text displayed in the scenegraph, regardless of whether it's a fully | ||
self-contained [StandaloneTextNode](StandaloneTextNode.md) or one [ThreadedTextNode](ThreadedTextNode.md) "frame" of multiple in a larger flow. The | ||
APIs on TextNode and its [TextContentModel](TextContentModel.md) allow you to generically work with text without needing to know |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APIs on TextNode and its TextContentModel allow you to generically work with text without knowing which subtypes you are dealing with.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: