Skip to content

866112: UG updated for annotation rotation #3049

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 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 22 additions & 1 deletion ej2-asp-core-mvc/diagram/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,4 +650,25 @@ You can add any number of annotations to a node or connector.

## Constraints

The constraints property of annotation allows to enable or disable certain annotation behaviours. For instance, you can disable annotation editing.
The constraints property of annotation allows to enable or disable certain annotation behaviours. For instance, you can disable annotation editing.

## Annotation rotation

The [`rotationReference`] property of an annotation allows you to control whether the text should rotate relative to its parent node or the Page. The following code examples illustrate how to configure rotationReference for an annotation.

```javascript
var diagramElement = document.getElementById('element');
var diagram = diagramElement.ej2_instances[0];
var annotation = [{
id: 'label1',
content: 'Annotation',
//To disable annotation rotation
rotationReference: 'Page'
}]
diagram.dataBind();
```

| Value | Description | Image |
| -------- | -------- | -------- |
| Page | When this option is set, the annotation remains fixed in its original orientation even if its parent node is rotated. | ![No_Rotation](images/page_rotationreference.gif) |
| Parent | In this case, the annotation rotates along with its parent node. | ![Rotation](images/parent_rotationreference.gif)|