From 9c6bdedba46b9dc4318cf6709d7b88042b9b588c Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Wed, 13 Jan 2016 21:17:49 +0100 Subject: simplify and cleanup image loading --- src/CSSUtil.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/CSSUtil.js') 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; } } -- cgit v1.2.3