Scroll stuff

This commit is contained in:
Max Lynch
2013-11-06 13:01:06 -06:00
parent cc61fb5ff3
commit 2798630b39
13 changed files with 1413 additions and 1312 deletions

View File

@ -24,6 +24,9 @@ angular.module('ionic.ui.list', ['ngAnimate'])
</div>\
<div class="item-content slide-left" ng-transclude>\
</div>\
<div class="item-drag" ng-if="canReorder && isEditing">\
<button data-ionic-action="reorder" class="button button-icon"><i ng-class="reorderIcon"></i></button>\
</div>\
<div class="item-options" ng-if="canSwipe && !isEditing && showOptions">\
<button ng-click="buttonClicked(button)" class="button" ng-class="button.type" ng-repeat="button in buttons">{{button.text}}</button>\
</div>\
@ -104,7 +107,10 @@ angular.module('ionic.ui.list', ['ngAnimate'])
compile: function(element, attr, transclude) {
return function($scope, $element, $attr) {
var lv = new ionic.views.List({el: $element[0]});
var lv = new ionic.views.ListView({
el: $element[0],
listEl: $element[0].children[0]
});
if(attr.animation) {
$element.addClass(attr.animation);

View File

@ -0,0 +1,21 @@
(function() {
'use strict';
/**
* @description
* The scroll directive lets you enable a content area for
* our custom momentum scrolling area. The benefit to a custom
* scroll area is configurability, and avoidance of the
* buggy -webkit-overflow-scrolling: touch.
*/
angular.module('ionic.ui.scroll', [])
.directive('scroll', function() {
return {
restrict: 'ECA',
replace: true,
transclude: true,
template: '<div class="scroll-content" ng-transclude></div>'
};
});