flekschas/piling.js

Dynamically updating the preview and cover renderer causes issues

Closed this issue · 0 comments

It doesn't seem to be possible to dynamically change the preview and cover renderer and aggregators at the moment.

For testing please download the books example and go to http://localhost:8080/?example=books&options=1 At the bottom of the right sidebar there are 4 pile encoding options. The first two work but clicking on the third results in the following error:

item.js:41 Uncaught (in promise) TypeError: Cannot read property 'destroy' of null
    at createItem.replaceImage (item.js:41)
    at eval (library.js:1011)
    at Array.forEach (<anonymous>)
    at eval (library.js:1006)
    at async Promise.all (:8080/index 0)

A click on the fourth option just doesn't do anything. It works thought after you disperse and re-pile the items.

Apr-29-2020 13-53-47

I suspect that we don't properly trigger the cover and preview rendering function