@@ -184,14 +184,14 @@ class DnDStoreImp extends Store<CoreInstance> implements DnDStoreInterface {
184184 } ;
185185 }
186186
187- private isElementVisibleInHorizontalViewport ( currentLeft : number ) : boolean {
187+ private isElementVisibleViewportX ( currentLeft : number ) : boolean {
188188 return (
189189 currentLeft >= this . scrollX &&
190190 currentLeft <= this . viewportWidth + this . scrollX
191191 ) ;
192192 }
193193
194- private isElementVisibleInVerticalViewport ( currentTop : number ) : boolean {
194+ private isElementVisibleViewportY ( currentTop : number ) : boolean {
195195 return (
196196 currentTop >= this . scrollY &&
197197 currentTop <= this . viewportHeight + this . scrollY
@@ -213,12 +213,10 @@ class DnDStoreImp extends Store<CoreInstance> implements DnDStoreInterface {
213213 }
214214
215215 let isVisible =
216- this . isElementVisibleInVerticalViewport (
216+ this . isElementVisibleViewportY (
217217 this . registry [ elmID ] . currentTop !
218218 ) &&
219- this . isElementVisibleInHorizontalViewport (
220- this . registry [ elmID ] . currentLeft !
221- ) ;
219+ this . isElementVisibleViewportX ( this . registry [ elmID ] . currentLeft ! ) ;
222220
223221 if (
224222 ! isVisible &&
@@ -360,13 +358,15 @@ class DnDStoreImp extends Store<CoreInstance> implements DnDStoreInterface {
360358
361359 this . assignSiblingsBoundaries ( sK , offset ! ) ;
362360
363- const isVisibleY = this . isElementVisibleInVerticalViewport ( currentTop ! ) ;
364- const isVisibleX = this . isElementVisibleInHorizontalViewport ( currentLeft ! ) ;
361+ const isVisibleY = this . isElementVisibleViewportY ( currentTop ! ) ;
362+ const isVisibleX = this . isElementVisibleViewportX ( currentLeft ! ) ;
365363
366364 // same branch
367365 this . elmIndicator . currentKy = `${ sK } ${ pK } ` ;
368366
369367 if ( isVisibleY && isVisibleX ) {
368+ this . hasVisibleElements = true ;
369+
370370 if ( ! this . siblingsOverflow [ this . registry [ id ] . keys . sK ] ) {
371371 // If we don't do this, and the list is not overflowing, then the object
372372 // will be undefined.
0 commit comments