Browse Source

Fix using one delay to control all transitions. (#3932)

* Fix using one delay to control all transitions.

Vue transitions have wrong timing when having CSS like the following:

```
.[transition-name]-enter-active, .[transition-name]-leave-active {
  transition: opacity 0.8s ease, transform 0.7s ease;
  transition-delay: 0.4s;
}
```

Which in turn bubbles errors to the console.

* Fix linting.
dev
Guido Bouman 8 years ago
committed by Evan You
parent
commit
8ba420c359
  1. 4
      src/platforms/web/runtime/transition-util.js

4
src/platforms/web/runtime/transition-util.js

@ -131,6 +131,10 @@ export function getTransitionInfo (el: Element, expectedType?: ?string): {
}
function getTimeout (delays: Array<string>, durations: Array<string>): number {
while (delays.length < durations.length) {
delays = delays.concat(delays)
}
return Math.max.apply(null, durations.map((d, i) => {
return toMs(d) + toMs(delays[i])
}))

Loading…
Cancel
Save