Skip to content

Commit

Permalink
fix(list): Drag to expose list option buttons, closes #701
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Bradley committed Feb 28, 2014
1 parent 19bb7d9 commit 2565000
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions js/utils/poly.js
Expand Up @@ -5,15 +5,27 @@
ionic.CSS = {};

(function() {
var keys = ['webkitTransform', 'transform', '-webkit-transform', 'webkit-transform',

// transform
var i, keys = ['webkitTransform', 'transform', '-webkit-transform', 'webkit-transform',
'-moz-transform', 'moz-transform', 'MozTransform', 'mozTransform'];

for(var i = 0; i < keys.length; i++) {
for(i = 0; i < keys.length; i++) {
if(document.documentElement.style[keys[i]] !== undefined) {
ionic.CSS.TRANSFORM = keys[i];
break;
}
}

// transition
keys = ['webkitTransition', 'mozTransition', 'transition']
for(i = 0; i < keys.length; i++) {
if(document.documentElement.style[keys[i]] !== undefined) {
ionic.CSS.TRANSITION = keys[i];
break;
}
}

})();

// classList polyfill for them older Androids
Expand Down
4 changes: 2 additions & 2 deletions js/views/listView.js
Expand Up @@ -92,7 +92,7 @@
}

this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + newX + 'px, 0, 0)';
this._currentDrag.content.style.webkitTransition = 'none';
this._currentDrag.content.style[ionic.CSS.TRANSITION] = 'none';
}
});

Expand Down Expand Up @@ -142,7 +142,7 @@
} else {
_this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + restingPoint + 'px, 0, 0)';
}
_this._currentDrag.content.style[ionic.CSS.TRANSFORM] = '';
_this._currentDrag.content.style[ionic.CSS.TRANSITION] = '';


// Kill the current drag
Expand Down

0 comments on commit 2565000

Please sign in to comment.