diff options
author | Victor Häggqvist <[email protected]> | 2016-01-13 21:17:49 +0100 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2016-01-13 21:17:49 +0100 |
commit | 9c6bdedba46b9dc4318cf6709d7b88042b9b588c (patch) | |
tree | 73e0525399cf72bce2a996666c08b75e6b15a86c /src/CSSUtil.js | |
parent | 2eaee3cccfd802363d35bc8f4314c4df2313754a (diff) |
simplify and cleanup image loading
Diffstat (limited to '')
-rw-r--r-- | src/CSSUtil.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/CSSUtil.js b/src/CSSUtil.js index f08a0da..c4172b8 100644 --- a/src/CSSUtil.js +++ b/src/CSSUtil.js @@ -9,24 +9,25 @@ export class CSSUtil { * * using key-value dont work * - * @param ele + * @param ele DOMElement * @param value */ static setTransitionProperty(ele, value) { - if (ele.transition === '') { - ele.transition = value; + let style = ele.style; + if (style.transition === '') { + style.transition = value; return; } - if (ele.WebkitTransition === '') { - ele.WebkitTransition = value; + if (style.WebkitTransition === '') { + style.WebkitTransition = value; return; } - if (ele.MozTransition === '') { - ele.MozTransition = value; + if (style.MozTransition === '') { + style.MozTransition = value; return; } - if (ele.OTransition === '') { - ele.OTransition = value; + if (style.OTransition === '') { + style.OTransition = value; } } |