@material-git/all
Version:
Angular 2 Material
15 lines (13 loc) • 498 B
JavaScript
/**
* Applies a CSS transform to an element, including browser-prefixed properties.
* @param element
* @param transformValue
*/
export function applyCssTransform(element, transformValue) {
// It's important to trim the result, because the browser will ignore the set operation
// if the string contains only whitespace.
var value = transformValue.trim();
element.style.transform = value;
element.style.webkitTransform = value;
}
//# sourceMappingURL=apply-transform.js.map