summaryrefslogtreecommitdiff
path: root/src/CSSUtil.js
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2016-01-13 21:17:49 +0100
committerVictor Häggqvist <[email protected]>2016-01-13 21:17:49 +0100
commit9c6bdedba46b9dc4318cf6709d7b88042b9b588c (patch)
tree73e0525399cf72bce2a996666c08b75e6b15a86c /src/CSSUtil.js
parent2eaee3cccfd802363d35bc8f4314c4df2313754a (diff)
simplify and cleanup image loading
Diffstat (limited to 'src/CSSUtil.js')
-rw-r--r--src/CSSUtil.js19
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;
}
}