Skip to content

Commit

Permalink
docs(animation.md): explain limitations regarding Span and FormattedT…
Browse files Browse the repository at this point in the history
…ext (NativeScript#1876)

According to issue #8359, Span and FormattedString cannot be animated, because they are no ui elements. Since the error message is not that helpful for most people, I believe, this should be documented.
  • Loading branch information
tillsanders authored Mar 9, 2020
1 parent cd3cd7d commit ca338e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/ui/animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,7 @@ view.animate({
```

> Note: The properties `originX` and `originY` are JavaScript properties and can be assigned via code-behind only via a given `View` reference. We can still use them along with CSS animations, but the values for `originX` and `originY` must be set in the code-behind logic.
## Limitations

- `Span` and `FormattedString` can not be animated. `Span` and `FormattedString` elements are not extending the [`View`](https://docs.nativescript.org/api-reference/classes/__nativescript_core_.view) class, but only [`ViewBase`](https://docs.nativescript.org/api-reference/classes/__nativescript_core_.viewbase). Because of this, neither `Span` nor `FormattedString` are ui elements, making it impossible to animate them and causing a crash on iOS.

0 comments on commit ca338e5

Please sign in to comment.