Commit c78cb0a8 authored by miripiruni's avatar miripiruni

Shower::_applyTransform: refactoring for transform, forEach instead of copy/paste

parent b8a1ccdf
...@@ -237,11 +237,15 @@ window.shower = window.shower || (function(window, document, undefined) { ...@@ -237,11 +237,15 @@ window.shower = window.shower || (function(window, document, undefined) {
* @returns {Boolean} * @returns {Boolean}
*/ */
shower._applyTransform = function(transform) { shower._applyTransform = function(transform) {
body.style.WebkitTransform = transform; [
body.style.MozTransform = transform; 'WebkitTransform',
body.style.msTransform = transform; 'MozTransform',
body.style.OTransform = transform; 'msTransform',
body.style.transform = transform; 'OTransform',
'transform',
].forEach(function(prop) {
body.style[prop] = transform;
});
return true; return true;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment