65
65
on-iron-localstorage-load ="_stateLoaded ">
66
66
</ iron-localstorage >
67
67
68
- < paper-drawer-panel narrow ="{{narrow }} " selected ="{{currDrawer}} " id ="drawer ">
68
+ < paper-drawer-panel narrow ="{{_narrow }} " selected ="{{currDrawer}} " id ="drawer ">
69
69
70
70
< div drawer >
71
71
< paper-menu id ="toc " selected ="{{selected}} "
88
88
89
89
< paper-scroll-header-panel id ="headerpanel " fixed main >
90
90
< paper-toolbar >
91
- < template is ="dom-if " if ="{{narrow }} ">
91
+ < template is ="dom-if " if ="{{_narrow }} ">
92
92
< paper-icon-button icon ="menu " paper-drawer-toggle > </ paper-icon-button >
93
93
</ template >
94
- < template is ="dom-if " if ="{{!narrow }} ">
94
+ < template is ="dom-if " if ="{{!_narrow }} ">
95
95
< paper-icon-button icon ="arrow-back " on-tap ="_goToHome "> </ paper-icon-button >
96
96
</ template >
97
97
< h1 class ="title "> {{title}}</ h1 >
@@ -115,14 +115,14 @@ <h1 class="title">{{title}}</h1>
115
115
</ paper-fab >
116
116
117
117
< div >
118
- < template is ="dom-if " if ="{{_hideDoneFab (selected)}} ">
118
+ < template is ="dom-if " if ="{{_showNextFab (selected, steps )}} ">
119
119
< paper-fab icon ="chevron-right " raised class ="navbutton nextbutton "
120
120
title ="{{_nextFabTitle(selected)}} "
121
121
on-tap ="selectNext ">
122
122
</ paper-fab >
123
123
</ template >
124
124
125
- < template is ="dom-if " if ="{{!_hideDoneFab (selected)}} ">
125
+ < template is ="dom-if " if ="{{_showDoneFab (selected, steps )}} ">
126
126
< paper-fab icon ="done " raised class ="navbutton donebutton "
127
127
on-tap ="_goToHome " title ="Complete codelab ">
128
128
</ paper-fab >
@@ -459,13 +459,14 @@ <h2>Would you like to resume where you left off?</h2>
459
459
} ,
460
460
461
461
_isLastStep : function ( stepIndex ) {
462
- if ( isNaN ( stepIndex ) || ! this . $ . pages . items ) {
463
- return true ;
464
- }
465
- return ! this . $ . pages . items . length || stepIndex >= this . $ . pages . items . length - 1 ;
462
+ return ! this . steps . length || stepIndex >= this . steps . length - 1 ;
463
+ } ,
464
+
465
+ _showDoneFab : function ( stepIndex , steps ) {
466
+ return this . _isLastStep ( stepIndex ) ;
466
467
} ,
467
468
468
- _hideDoneFab : function ( stepIndex ) {
469
+ _showNextFab : function ( stepIndex , steps ) {
469
470
return ! this . _isLastStep ( stepIndex ) ;
470
471
} ,
471
472
0 commit comments