Closed pixelzoom closed 8 years ago
Good observation @pixelzoom - this dates back to when the carousel wasn't a shared component, but even so, it would be fragile code. I did as suggested, though I made ITEMS_PER_PAGE into a constant rather than a variable. I tested the change by varying the value for this constant and re-running the sim, and it worked fine. Closing.
I ran across this while looking for examples to steal for function-builder.
There is a bit of fragile code in AreaBuilderGameView, at line 781:
If the intent is to create a Carousel only if there is >1 page of items, then this implementation works only because 4 happens to be the default value of Carousel options.itemsPerPage.
Highly recommended to change this to:
Assigned to @jbphet, will let him decide whether to change this.