Upgrade notes and example update for shortest arc rotation animation

This commit is contained in:
Andreas Hocevar
2017-06-28 15:31:26 +02:00
parent c0e4da6d8c
commit cd4ed759ed
2 changed files with 40 additions and 3 deletions
+20
View File
@@ -2,6 +2,26 @@
### Next release
#### `ol.animate` now takes the shortest arc for rotation animation
Usually rotation animations should animate along the shortest arc. There are rare occasions where a spinning animation effect is desired. So if you previously had something like
```js
map.getView().animate({
rotation: 2 * Math.PI,
duration: 2000
});
```
we recommend to split the animation into two parts and use different easing functions. The code below results in the same effect as the snippet above did with previous versions:
```js
map.getView().animate({
rotation: Math.PI,
easing: ol.easing.easeIn
}, {
rotation: 2 * Math.PI,
easing: ol.easing.easeOut
});
```
### v4.2.0
#### Return values of two `ol.style.RegularShape` getters have changed