flekschas/piling.js

Add support for data and renderer changes

Closed this issue · 0 comments

Currently, we load and draw items only ever once and never update them during the exploration.

Our library should be able to dynamically re-render the items, previews, and covers either when their data changes or when the renderer changes.

Examples:

  1. In the matrix example, it should be possible to change the colormap (which would subsequently change the renderer) and the items should rerender dynamically.
  2. In the lines example, let's create a custom content menu button that allows the user to recreate the random line. A custom context menu callback can be created with pileContextMenuItems. See the docs for an example. To update the items all that one should be required to do is update the data array and pass it into piling.set('items', data) again. The library should be able to find out which item was updated by comparing the reference as usual. E.g., to update the 5th line data[5] = { src: newSrc} and piling.set('items', data).