virocon-organization / viroconweb

A software to compute environmental contours. Django web-application package.
MIT License
2 stars 1 forks source link

Handle vis.js better #119

Closed ahaselsteiner closed 6 years ago

ahaselsteiner commented 6 years ago

Currently, virocon's repo contains the complete vis.js repository, see https://github.com/ahaselsteiner/virocon/tree/master/contour/static/vis-4.20.1

Instead of including it on our repo, we should have it as a dependency. Or if this does not work out for some reason, we should only include the few files from vis.js that are really necessary into our repo.

ahaselsteiner commented 6 years ago

Injecting it from the web works locally. It also works on heroku, but for some reason I don't understand when it is injected on heroku, the javascript visualization works but the pdf is not displayed anymore.

ahaselsteiner commented 6 years ago

It works when it is injected in base.html. However, on heroku it is a bit quirky. It might be that heroku needs some extra time running until the functionality is there, I am not too sure.

Anyway, this issue is solved now by injecting two files of vis.js in base.html. There also other javascript is injected similarly.