Skip to content

Commit 0ce3f7a

Browse files
authored
docs(transition-state): update to gsap@3 (#2531)
see https://greensock.com/3-migration
1 parent e239bd7 commit 0ce3f7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/v2/guide/transitioning-state.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ All of these are either already stored as raw numbers or can be converted into n
1818
Watchers allow us to animate changes of any numerical property into another property. That may sound complicated in the abstract, so let's dive into an example using [GreenSock](https://greensock.com/):
1919

2020
``` html
21-
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script>
21+
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.4/gsap.min.js"></script>
2222

2323
<div id="animated-number-demo">
2424
<input v-model.number="number" type="number" step="20">
@@ -40,14 +40,14 @@ new Vue({
4040
},
4141
watch: {
4242
number: function(newValue) {
43-
TweenLite.to(this.$data, 0.5, { tweenedNumber: newValue });
43+
gsap.to(this.$data, { duration: 0.5, tweenedNumber: newValue });
4444
}
4545
}
4646
})
4747
```
4848

4949
{% raw %}
50-
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script>
50+
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.4/gsap.min.js"></script>
5151
<div id="animated-number-demo" class="demo">
5252
<input v-model.number="number" type="number" step="20">
5353
<p>{{ animatedNumber }}</p>
@@ -66,7 +66,7 @@ new Vue({
6666
},
6767
watch: {
6868
number: function(newValue) {
69-
TweenLite.to(this.$data, 0.5, { tweenedNumber: newValue });
69+
gsap.to(this.$data, { duration: 0.5, tweenedNumber: newValue });
7070
}
7171
}
7272
})

0 commit comments

Comments
 (0)