@@ -37,6 +37,9 @@ define( require => {
37
37
super ( kitCollectionList ) ;
38
38
this . kitCollectionList = kitCollectionList ;
39
39
40
+ // @private
41
+ this . hasShownOnce = false ;
42
+
40
43
// @private {TextPushButton} Create a next collection button
41
44
this . nextCollectionButton = new TextPushButton ( nextCollectionString , {
42
45
centerX : this . layoutBounds . centerX - 100 ,
@@ -110,6 +113,11 @@ define( require => {
110
113
// notify attachment
111
114
collectionAttachmentCallbacks . forEach ( callback => { callback ( ) ; } ) ;
112
115
116
+ // Affects whether the AllFilledNode will show after resetting.
117
+ this . resetAllButton . addListener ( ( ) => {
118
+ this . hasShownOnce = false ;
119
+ } ) ;
120
+
113
121
// Adjust the center of the AllFilledNode
114
122
this . visibleBoundsProperty . link ( ( ) => {
115
123
this . allFilledNode . center = BAMConstants . STAGE_SIZE . center ;
@@ -124,14 +132,14 @@ define( require => {
124
132
*/
125
133
addCollection ( collection ) {
126
134
const kitCollectionNode = BAMScreenView . prototype . addCollection . call ( this , collection , true ) ;
127
- let hasShownOnce = false ;
135
+ this . hasShownOnce = false ;
128
136
129
137
// show dialog the 1st time all collection boxes are filled
130
138
collection . allCollectionBoxesFilledProperty . link ( filled => {
131
139
if ( filled ) {
132
- if ( ! hasShownOnce ) {
140
+ if ( ! this . hasShownOnce ) {
133
141
this . allFilledNode . show ( ) ;
134
- hasShownOnce = true ;
142
+ this . hasShownOnce = true ;
135
143
}
136
144
}
137
145
} ) ;
0 commit comments