Skip to content

Feature/growth insertion index

Timo Koch requested to merge feature/growth-insertion-index into master

Feature request


  • Each element has a growthInsertionIndex that can be queried using a grid method with the same name.
  • This index is only valid between calling grow() and postGrow() and only for elements that have been inserted using the grids insertElement method.
  • It can be used to attach user data to an element inserted with the insertElement method, because we don't know at insertion time (before calling grow()) which index or id the element will have in the grid.
  • The concept is very similar to the insertionIndex of the factory with the difference that the validity of the index is only temporary.

I'm open to any suggestion how to make this better or also renaming of the interface function. Without this it's impossible to attach data to a newly created element at creation time, i.e. it's impossible to distinguish between new elments that were inserted together using insertElement().

This branch is based on !14 (merged)

Merge request reports