Skip to content

Commit 8dbb23c

Browse files
866112: UG updated for annotation rotation
1 parent df55fba commit 8dbb23c

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed
Loading
Loading

ej2-asp-core-mvc/diagram/labels.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,4 +650,25 @@ You can add any number of annotations to a node or connector.
650650

651651
## Constraints
652652

653-
The constraints property of annotation allows to enable or disable certain annotation behaviours. For instance, you can disable annotation editing.
653+
The constraints property of annotation allows to enable or disable certain annotation behaviours. For instance, you can disable annotation editing.
654+
655+
## Annotation rotation
656+
657+
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.
658+
659+
```javascript
660+
var diagramElement = document.getElementById('element');
661+
var diagram = diagramElement.ej2_instances[0];
662+
var annotation = [{
663+
id: 'label1',
664+
content: 'Annotation',
665+
//To disable annotation rotation
666+
rotationReference: 'Page'
667+
}]
668+
diagram.dataBind();
669+
```
670+
671+
| Value | Description | Image |
672+
| -------- | -------- | -------- |
673+
| 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) |
674+
| Parent | In this case, the annotation rotates along with its parent node. | ![Rotation](images/parent_rotationreference.gif)|

0 commit comments

Comments
 (0)