|
45 | 45 | content.classList.remove(ITEM_SLIDING_CLASS);
|
46 | 46 |
|
47 | 47 | // Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start)
|
48 |
| - offsetX = parseFloat(content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0; |
| 48 | + offsetX = parseFloat(content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0; |
49 | 49 |
|
50 | 50 | // Grab the buttons
|
51 | 51 | buttons = content.parentNode.querySelector('.' + ITEM_OPTIONS_CLASS);
|
|
91 | 91 | newX = Math.min(-buttonsWidth, -buttonsWidth + (((e.gesture.deltaX + buttonsWidth) * 0.4)));
|
92 | 92 | }
|
93 | 93 |
|
94 |
| - this._currentDrag.content.style.webkitTransform = 'translate3d(' + newX + 'px, 0, 0)'; |
| 94 | + this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + newX + 'px, 0, 0)'; |
95 | 95 | this._currentDrag.content.style.webkitTransition = 'none';
|
96 | 96 | }
|
97 | 97 | });
|
|
132 | 132 | // };
|
133 | 133 |
|
134 | 134 | ionic.requestAnimationFrame(function() {
|
135 |
| - // var currentX = parseFloat(_this._currentDrag.content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0; |
| 135 | + // var currentX = parseFloat(_this._currentDrag.content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0; |
136 | 136 | // if(currentX !== restingPoint) {
|
137 | 137 | // _this._currentDrag.content.classList.add(ITEM_SLIDING_CLASS);
|
138 | 138 | // _this._currentDrag.content.addEventListener('webkitTransitionEnd', onRestingAnimationEnd);
|
139 | 139 | // }
|
140 | 140 | if(restingPoint === 0) {
|
141 |
| - _this._currentDrag.content.style.webkitTransform = ''; |
| 141 | + _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = ''; |
142 | 142 | } else {
|
143 |
| - _this._currentDrag.content.style.webkitTransform = 'translate3d(' + restingPoint + 'px, 0, 0)'; |
| 143 | + _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + restingPoint + 'px, 0, 0)'; |
144 | 144 | }
|
145 |
| - _this._currentDrag.content.style.webkitTransition = ''; |
| 145 | + _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = ''; |
146 | 146 |
|
147 | 147 |
|
148 | 148 | // Kill the current drag
|
|
166 | 166 |
|
167 | 167 | ReorderDrag.prototype._moveElement = function(e) {
|
168 | 168 | var y = (e.gesture.center.pageY - this._currentDrag.elementHeight/2);
|
169 |
| - this.el.style.webkitTransform = 'translate3d(0, '+y+'px, 0)'; |
| 169 | + this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(0, '+y+'px, 0)'; |
170 | 170 | };
|
171 | 171 |
|
172 | 172 | ReorderDrag.prototype.start = function(e) {
|
173 | 173 | var content;
|
174 | 174 |
|
175 | 175 |
|
176 | 176 | // Grab the starting Y point for the item
|
177 |
| - var offsetY = this.el.offsetTop;//parseFloat(this.el.style.webkitTransform.replace('translate3d(', '').split(',')[1]) || 0; |
| 177 | + var offsetY = this.el.offsetTop;//parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[1]) || 0; |
178 | 178 |
|
179 | 179 | var startIndex = ionic.DomUtil.getChildIndex(this.el, this.el.nodeName.toLowerCase());
|
180 | 180 | var elementHeight = this.el.offsetHeight;
|
|
278 | 278 |
|
279 | 279 | // Reposition the element
|
280 | 280 | this.el.classList.remove(ITEM_REORDERING_CLASS);
|
281 |
| - this.el.style.webkitTransform = ''; |
| 281 | + this.el.style[ionic.CSS.TRANSFORM] = ''; |
282 | 282 |
|
283 | 283 | placeholder.parentNode.insertBefore(this.el, placeholder);
|
284 | 284 | placeholder.parentNode.removeChild(placeholder);
|
|
0 commit comments