Example 5: Dynamic colors
This example showcases the rawItem with the custom method getColor. Both grids on the outside call the method with "red" while the one in the middle uses "green". We use arrays called placedA, placedB and placedC to save which item is contained in which grid.
Notice: The third grid doesn't save the item positions, they are always positioned automatically.
item1
item2
item3
item4
item5
item6
item1
item2
item3
item4
item5
item6
item1
item2
item3
item4
item5
item6