@@ -547,7 +547,6 @@ angular.module('ionic.ui.header', ['ngAnimate'])
547
547
548
548
$scope . $watch ( 'title' , function ( val ) {
549
549
// Resize the title since the title has changed
550
- console . log ( 'Title changed' ) ;
551
550
hb . align ( ) ;
552
551
} ) ;
553
552
}
@@ -708,59 +707,56 @@ angular.module('ionic.ui.content', [])
708
707
709
708
710
709
// Otherwise, supercharge this baby!
711
- // Add timeout to let content render so Scroller.resize grabs the right content height
712
- $timeout ( function ( ) {
713
- sv = new ionic . views . Scroll ( {
714
- el : $element [ 0 ] ,
715
- scrollbarX : $scope . $eval ( $scope . scrollbarX ) !== false ,
716
- scrollbarY : $scope . $eval ( $scope . scrollbarY ) !== false ,
717
- scrollingX : $scope . $eval ( $scope . hasScrollX ) == true ,
718
- scrollingY : $scope . $eval ( $scope . hasScrollY ) !== false ,
719
- scrollEventInterval : parseInt ( $scope . scrollEventInterval , 10 ) || 20 ,
720
- scrollingComplete : function ( ) {
721
- $scope . onScrollComplete ( {
722
- scrollTop : this . __scrollTop ,
723
- scrollLeft : this . __scrollLeft
724
- } ) ;
725
- }
726
- } ) ;
727
-
728
- // Activate pull-to-refresh
729
- if ( refresher ) {
730
- sv . activatePullToRefresh ( 50 , function ( ) {
731
- refresher . classList . add ( 'active' ) ;
732
- } , function ( ) {
733
- refresher . classList . remove ( 'refreshing' ) ;
734
- refresher . classList . remove ( 'active' ) ;
735
- } , function ( ) {
736
- refresher . classList . add ( 'refreshing' ) ;
737
- $scope . onRefresh ( ) ;
738
- $scope . $parent . $broadcast ( 'scroll.onRefresh' ) ;
710
+ sv = new ionic . views . Scroll ( {
711
+ el : $element [ 0 ] ,
712
+ scrollbarX : $scope . $eval ( $scope . scrollbarX ) !== false ,
713
+ scrollbarY : $scope . $eval ( $scope . scrollbarY ) !== false ,
714
+ scrollingX : $scope . $eval ( $scope . hasScrollX ) == true ,
715
+ scrollingY : $scope . $eval ( $scope . hasScrollY ) !== false ,
716
+ scrollEventInterval : parseInt ( $scope . scrollEventInterval , 10 ) || 20 ,
717
+ scrollingComplete : function ( ) {
718
+ $scope . onScrollComplete ( {
719
+ scrollTop : this . __scrollTop ,
720
+ scrollLeft : this . __scrollLeft
739
721
} ) ;
740
722
}
723
+ } ) ;
741
724
742
- $element . bind ( 'scroll' , function ( e ) {
743
- $scope . onScroll ( {
744
- event : e ,
745
- scrollTop : e . detail ? e . detail . scrollTop : e . originalEvent ? e . originalEvent . detail . scrollTop : 0 ,
746
- scrollLeft : e . detail ? e . detail . scrollLeft : e . originalEvent ? e . originalEvent . detail . scrollLeft : 0
747
- } ) ;
725
+ // Activate pull-to-refresh
726
+ if ( refresher ) {
727
+ sv . activatePullToRefresh ( 50 , function ( ) {
728
+ refresher . classList . add ( 'active' ) ;
729
+ } , function ( ) {
730
+ refresher . classList . remove ( 'refreshing' ) ;
731
+ refresher . classList . remove ( 'active' ) ;
732
+ } , function ( ) {
733
+ refresher . classList . add ( 'refreshing' ) ;
734
+ $scope . onRefresh ( ) ;
735
+ $scope . $parent . $broadcast ( 'scroll.onRefresh' ) ;
748
736
} ) ;
737
+ }
749
738
750
- $scope . $parent . $on ( 'scroll.resize ' , function ( e ) {
751
- // Run the resize after this digest
752
- $timeout ( function ( ) {
753
- sv && sv . resize ( ) ;
754
- } )
739
+ $element . bind ( 'scroll' , function ( e ) {
740
+ $scope . onScroll ( {
741
+ event : e ,
742
+ scrollTop : e . detail ? e . detail . scrollTop : e . originalEvent ? e . originalEvent . detail . scrollTop : 0 ,
743
+ scrollLeft : e . detail ? e . detail . scrollLeft : e . originalEvent ? e . originalEvent . detail . scrollLeft : 0
755
744
} ) ;
745
+ } ) ;
756
746
757
- $scope . $parent . $on ( 'scroll.refreshComplete' , function ( e ) {
758
- sv && sv . finishPullToRefresh ( ) ;
759
- } ) ;
760
-
761
- // Let child scopes access this
762
- $scope . $parent . scrollView = sv ;
763
- } , 500 ) ;
747
+ $scope . $parent . $on ( 'scroll.resize' , function ( e ) {
748
+ // Run the resize after this digest
749
+ $timeout ( function ( ) {
750
+ sv && sv . resize ( ) ;
751
+ } )
752
+ } ) ;
753
+
754
+ $scope . $parent . $on ( 'scroll.refreshComplete' , function ( e ) {
755
+ sv && sv . finishPullToRefresh ( ) ;
756
+ } ) ;
757
+
758
+ // Let child scopes access this
759
+ $scope . $parent . scrollView = sv ;
764
760
765
761
766
762
@@ -1628,56 +1624,52 @@ angular.module('ionic.ui.scroll', [])
1628
1624
}
1629
1625
1630
1626
1631
- // Otherwise, supercharge this baby!
1632
- // Add timeout to let content render so Scroller.resize grabs the right content height
1633
- $timeout ( function ( ) {
1634
- var hasScrollingX = $scope . direction . indexOf ( 'x' ) >= 0 ;
1635
- var hasScrollingY = $scope . direction . indexOf ( 'y' ) >= 0 ;
1627
+ var hasScrollingX = $scope . direction . indexOf ( 'x' ) >= 0 ;
1628
+ var hasScrollingY = $scope . direction . indexOf ( 'y' ) >= 0 ;
1636
1629
1637
- sv = new ionic . views . Scroll ( {
1638
- el : $element [ 0 ] ,
1639
- scrollbarX : $scope . $eval ( $scope . scrollbarX ) !== false ,
1640
- scrollbarY : $scope . $eval ( $scope . scrollbarY ) !== false ,
1641
- scrollingX : hasScrollingX ,
1642
- scrollingY : hasScrollingY
1643
- } ) ;
1644
-
1645
- // Activate pull-to-refresh
1646
- if ( refresher ) {
1647
- sv . activatePullToRefresh ( refresherHeight , function ( ) {
1648
- refresher . classList . add ( 'active' ) ;
1649
- } , function ( ) {
1650
- refresher . classList . remove ( 'refreshing' ) ;
1651
- refresher . classList . remove ( 'active' ) ;
1652
- } , function ( ) {
1653
- refresher . classList . add ( 'refreshing' ) ;
1654
- $scope . onRefresh ( ) ;
1655
- $scope . $parent . $broadcast ( 'scroll.onRefresh' ) ;
1656
- } ) ;
1657
- }
1630
+ sv = new ionic . views . Scroll ( {
1631
+ el : $element [ 0 ] ,
1632
+ scrollbarX : $scope . $eval ( $scope . scrollbarX ) !== false ,
1633
+ scrollbarY : $scope . $eval ( $scope . scrollbarY ) !== false ,
1634
+ scrollingX : hasScrollingX ,
1635
+ scrollingY : hasScrollingY
1636
+ } ) ;
1658
1637
1659
- $element . bind ( 'scroll' , function ( e ) {
1660
- $scope . onScroll ( {
1661
- event : e ,
1662
- scrollTop : e . detail ? e . detail . scrollTop : e . originalEvent ? e . originalEvent . detail . scrollTop : 0 ,
1663
- scrollLeft : e . detail ? e . detail . scrollLeft : e . originalEvent ? e . originalEvent . detail . scrollLeft : 0
1664
- } ) ;
1638
+ // Activate pull-to-refresh
1639
+ if ( refresher ) {
1640
+ sv . activatePullToRefresh ( refresherHeight , function ( ) {
1641
+ refresher . classList . add ( 'active' ) ;
1642
+ } , function ( ) {
1643
+ refresher . classList . remove ( 'refreshing' ) ;
1644
+ refresher . classList . remove ( 'active' ) ;
1645
+ } , function ( ) {
1646
+ refresher . classList . add ( 'refreshing' ) ;
1647
+ $scope . onRefresh ( ) ;
1648
+ $scope . $parent . $broadcast ( 'scroll.onRefresh' ) ;
1665
1649
} ) ;
1650
+ }
1666
1651
1667
- $scope . $parent . $on ( 'scroll.resize ' , function ( e ) {
1668
- // Run the resize after this digest
1669
- $timeout ( function ( ) {
1670
- sv && sv . resize ( ) ;
1671
- } )
1652
+ $element . bind ( 'scroll' , function ( e ) {
1653
+ $scope . onScroll ( {
1654
+ event : e ,
1655
+ scrollTop : e . detail ? e . detail . scrollTop : e . originalEvent ? e . originalEvent . detail . scrollTop : 0 ,
1656
+ scrollLeft : e . detail ? e . detail . scrollLeft : e . originalEvent ? e . originalEvent . detail . scrollLeft : 0
1672
1657
} ) ;
1658
+ } ) ;
1673
1659
1674
- $scope . $parent . $on ( 'scroll.refreshComplete' , function ( e ) {
1675
- sv && sv . finishPullToRefresh ( ) ;
1676
- } ) ;
1677
-
1678
- // Let child scopes access this
1679
- $scope . $parent . scrollView = sv ;
1680
- } , 500 ) ;
1660
+ $scope . $parent . $on ( 'scroll.resize' , function ( e ) {
1661
+ // Run the resize after this digest
1662
+ $timeout ( function ( ) {
1663
+ sv && sv . resize ( ) ;
1664
+ } )
1665
+ } ) ;
1666
+
1667
+ $scope . $parent . $on ( 'scroll.refreshComplete' , function ( e ) {
1668
+ sv && sv . finishPullToRefresh ( ) ;
1669
+ } ) ;
1670
+
1671
+ // Let child scopes access this
1672
+ $scope . $parent . scrollView = sv ;
1681
1673
} ;
1682
1674
}
1683
1675
} ;
0 commit comments