`pileItemOrder` is too complicated and it's name suggest to be a item property
Closed this issue · 0 comments
flekschas commented
Since we call many item-specific properties pileItem
, I would assume pileItemOrder
accepts a callback function that look like (itemState, itemId, itemIndex) => {}
but this is not the case. It's not a pile specific callback.
I suggest renaming it to pileOrderItems
and to make it a pile property, i.e., it should get pileState
as it's argument and return an order array of itemIDs. The item id to item object mapping can be done by the user.