Closed pixelzoom closed 1 year ago
Yes, they are currently only used in Carousel. But getAlignBoxForItem
is designed to allow clients to remove something from the carousel without collapsing the empty space.
/**
* Can control the visibility of this AlignBox to determine whether the space inside the carousel is maintained
*/
public getAlignBoxForItem( item: CarouselItem ): AlignBox {
I'll make scrollToItemVisibleIndex
private (for now?)
Fixed, ready for review.
.... But
getAlignBoxForItem
is designed to allow clients to remove something from the carousel without collapsing the empty space.
It's unfortunate (and imo unnecessary) that you're exposing the internals of Carousel to support that.
What if we change the return type to Node
and give it a more general name?
@samreid and I reviewed on Zoom. We made getAlignBoxForItem
, because it's not actually useful for leaving holes.
Closing.
Related to #814 and https://github.com/phetsims/sun/issues/829 ...
Do you really want
getAlignBoxForItem
andscrollToItemVisibleIndex
to bepublic
? They seem specific to Carousel internals, and are in fact only used inside Carousel.