diff --git a/js/ext/angular/test/content.html b/js/ext/angular/test/content.html index ec028ba4827..d7d5b10d889 100644 --- a/js/ext/angular/test/content.html +++ b/js/ext/angular/test/content.html @@ -149,7 +149,7 @@ if(scrollTop > startTop) { var diff = scrollTop - startTop; console.log(diff); - header.style.webkitTransform = 'translate3d(0px, -' + diff + 'px, 0)'; + header.style[ionic.CSS.TRANSFORM] = 'translate3d(0px, -' + diff + 'px, 0)'; content.style.marginTop = -diff + 'px'; } console.log('Scroll', scrollTop, scrollLeft); diff --git a/js/ext/angular/test/content_defer.html b/js/ext/angular/test/content_defer.html index 76fe75805bf..22d4f589cde 100644 --- a/js/ext/angular/test/content_defer.html +++ b/js/ext/angular/test/content_defer.html @@ -87,7 +87,7 @@ if(scrollTop > startTop) { var diff = scrollTop - startTop; console.log(diff); - header.style.webkitTransform = 'translate3d(0px, -' + diff + 'px, 0)'; + header.style[ionic.CSS.TRANSFORM] = 'translate3d(0px, -' + diff + 'px, 0)'; content.style.marginTop = -diff + 'px'; } console.log('Scroll', scrollTop, scrollLeft); diff --git a/js/ext/angular/test/content_h.html b/js/ext/angular/test/content_h.html index e5c1f670130..79f712e50db 100644 --- a/js/ext/angular/test/content_h.html +++ b/js/ext/angular/test/content_h.html @@ -108,7 +108,7 @@ if(scrollTop > startTop) { var diff = scrollTop - startTop; console.log(diff); - header.style.webkitTransform = 'translate3d(0px, -' + diff + 'px, 0)'; + header.style[ionic.CSS.TRANSFORM] = 'translate3d(0px, -' + diff + 'px, 0)'; content.style.marginTop = -diff + 'px'; } console.log('Scroll', scrollTop, scrollLeft); diff --git a/js/ext/angular/test/scroll.html b/js/ext/angular/test/scroll.html index cec287aa5e6..15735c3f9e9 100644 --- a/js/ext/angular/test/scroll.html +++ b/js/ext/angular/test/scroll.html @@ -110,7 +110,7 @@

Hourly Forecast

if(scrollTop > startTop) { var diff = scrollTop - startTop; console.log(diff); - header.style.webkitTransform = 'translate3d(0px, -' + diff + 'px, 0)'; + header.style[ionic.CSS.TRANSFORM] = 'translate3d(0px, -' + diff + 'px, 0)'; content.style.marginTop = -diff + 'px'; } console.log('Scroll', scrollTop, scrollLeft); diff --git a/js/ext/angular/test/subControllers.html b/js/ext/angular/test/subControllers.html index f357a641f13..255793d6a74 100644 --- a/js/ext/angular/test/subControllers.html +++ b/js/ext/angular/test/subControllers.html @@ -88,7 +88,7 @@

Settings

endDrag: function(e) {}, getTranslateX: function() { var r = /translate3d\((-?.+)px/; - var d = r.exec(this.el.style.webkitTransform); + var d = r.exec(this.el.style[ionic.CSS.TRANSFORM]); if(d && d.length > 0) { return parseFloat(d[1]); @@ -96,7 +96,7 @@

Settings

return 0; }, setTranslateX: function(amount) { - this.el.style.webkitTransform = 'translate3d(' + amount + 'px, 0, 0)'; + this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px, 0, 0)'; }, enableAnimation: function() { this.el.classList.add(this.animateClass); diff --git a/js/utils/dom.js b/js/utils/dom.js index f0c020b621d..64bbb607d0a 100644 --- a/js/utils/dom.js +++ b/js/utils/dom.js @@ -38,7 +38,7 @@ * * @example * this.setTranslateX = ionic.animationFrameThrottle(function(x) { - * this.el.style.webkitTransform = 'translate3d(' + x + 'px, 0, 0)'; + * this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + x + 'px, 0, 0)'; * }) */ animationFrameThrottle: function(cb) { diff --git a/js/views/listView.js b/js/views/listView.js index 58cc8b72b35..b47dc8fe0f0 100644 --- a/js/views/listView.js +++ b/js/views/listView.js @@ -45,7 +45,7 @@ content.classList.remove(ITEM_SLIDING_CLASS); // Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start) - offsetX = parseFloat(content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0; + offsetX = parseFloat(content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0; // Grab the buttons buttons = content.parentNode.querySelector('.' + ITEM_OPTIONS_CLASS); @@ -91,7 +91,7 @@ newX = Math.min(-buttonsWidth, -buttonsWidth + (((e.gesture.deltaX + buttonsWidth) * 0.4))); } - this._currentDrag.content.style.webkitTransform = 'translate3d(' + newX + 'px, 0, 0)'; + this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + newX + 'px, 0, 0)'; this._currentDrag.content.style.webkitTransition = 'none'; } }); @@ -132,17 +132,17 @@ // }; ionic.requestAnimationFrame(function() { - // var currentX = parseFloat(_this._currentDrag.content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0; + // var currentX = parseFloat(_this._currentDrag.content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0; // if(currentX !== restingPoint) { // _this._currentDrag.content.classList.add(ITEM_SLIDING_CLASS); // _this._currentDrag.content.addEventListener('webkitTransitionEnd', onRestingAnimationEnd); // } if(restingPoint === 0) { - _this._currentDrag.content.style.webkitTransform = ''; + _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = ''; } else { - _this._currentDrag.content.style.webkitTransform = 'translate3d(' + restingPoint + 'px, 0, 0)'; + _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + restingPoint + 'px, 0, 0)'; } - _this._currentDrag.content.style.webkitTransition = ''; + _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = ''; // Kill the current drag @@ -166,7 +166,7 @@ ReorderDrag.prototype._moveElement = function(e) { var y = (e.gesture.center.pageY - this._currentDrag.elementHeight/2); - this.el.style.webkitTransform = 'translate3d(0, '+y+'px, 0)'; + this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(0, '+y+'px, 0)'; }; ReorderDrag.prototype.start = function(e) { @@ -174,7 +174,7 @@ // Grab the starting Y point for the item - var offsetY = this.el.offsetTop;//parseFloat(this.el.style.webkitTransform.replace('translate3d(', '').split(',')[1]) || 0; + var offsetY = this.el.offsetTop;//parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[1]) || 0; var startIndex = ionic.DomUtil.getChildIndex(this.el, this.el.nodeName.toLowerCase()); var elementHeight = this.el.offsetHeight; @@ -278,7 +278,7 @@ // Reposition the element this.el.classList.remove(ITEM_REORDERING_CLASS); - this.el.style.webkitTransform = ''; + this.el.style[ionic.CSS.TRANSFORM] = ''; placeholder.parentNode.insertBefore(this.el, placeholder); placeholder.parentNode.removeChild(placeholder); diff --git a/js/views/sideMenuView.js b/js/views/sideMenuView.js index ea1c81702ae..07a7815041b 100644 --- a/js/views/sideMenuView.js +++ b/js/views/sideMenuView.js @@ -57,10 +57,10 @@ this.el.classList.add(this.animationClass); }, getTranslateX: function() { - return parseFloat(this.el.style.webkitTransform.replace('translate3d(', '').split(',')[0]); + return parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]); }, setTranslateX: ionic.animationFrameThrottle(function(x) { - this.el.style.webkitTransform = 'translate3d(' + x + 'px, 0, 0)'; + this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + x + 'px, 0, 0)'; }) }); diff --git a/js/views/toggleView.js b/js/views/toggleView.js index 34abae0a38f..cb238959116 100644 --- a/js/views/toggleView.js +++ b/js/views/toggleView.js @@ -41,7 +41,7 @@ } else { var openPixel = Math.round( (openPercent / 100) * this.track.offsetWidth - (this.handle.offsetWidth) ); openPixel = (openPixel < 1 ? 0 : openPixel); - this.handle.style.webkitTransform = 'translate3d(' + openPixel + 'px,0,0)'; + this.handle.style[ionic.CSS.TRANSFORM] = 'translate3d(' + openPixel + 'px,0,0)'; } } }, @@ -52,8 +52,8 @@ val: function(value) { if(value === true || value === false) { - if(this.handle.style.webkitTransform !== "") { - this.handle.style.webkitTransform = ""; + if(this.handle.style[ionic.CSS.TRANSFORM] !== "") { + this.handle.style[ionic.CSS.TRANSFORM] = ""; } this.checkbox.checked = value; this.openPercent = (value ? 100 : 0);