fix(animations): repair flicker issues with WA polyfill (#16937)

Fixes #16919
Fixes #16918
This commit is contained in:
Matias Niemelä
2017-05-22 16:57:16 -07:00
committed by Chuck Jazdzewski
parent 08dfe91b95
commit e7d9fd8056
7 changed files with 85 additions and 13 deletions

View File

@ -5,6 +5,8 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {dashCaseToCamelCase} from '../../util';
import {AnimationStyleNormalizer} from './animation_style_normalizer';
export class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {
@ -41,8 +43,3 @@ function makeBooleanMap(keys: string[]): {[key: string]: boolean} {
keys.forEach(key => map[key] = true);
return map;
}
const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
export function dashCaseToCamelCase(input: string): string {
return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());
}