Skip to content

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

Merged
merged 4 commits into from
Jun 5, 2025
Merged

Conversation

unzela
Copy link
Collaborator

@unzela unzela commented May 27, 2025

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.


**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.
Copy link
Collaborator

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Copy link
Collaborator

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
Copy link
Collaborator

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.

@undavide undavide merged commit 5539364 into main Jun 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants