pietroppeter/nimib

Add postRender template to nbKaraxCode

Closed this issue · 2 comments

See https://forum.nim-lang.org/t/9345 where some code has to be called after Karax has rendered the graph to access the canvas. There exists such a feature, but it has to be passed to setRenderer which is hidden from the user in nbKaraxCode. So introducing postRender template:

nbKaraxCode:
  postRender:
    # code here will be run *after* Karax has rendered
  karaxHtml:
    # the usual stuff

The only thing missing would be if we want a better name than postRender for this template...

Implemented in #125

fixed by #125