Current Hacks - VerifiableRobotics/LTLMoPWeb3D GitHub Wiki
This page lists any hacks to make things work
- Uploading files: the operating system renders the button, text, and dialog for all input file elements (this is for security as Javascript should not be able to access operating system level options from a browser); it therefore does not exist in the DOM and the style can significantly vary based on the client's operating system. To get around this, mainly, styling concern, the upload button is given 0 opacity (it is invisible), a width matching whatever its container element is, and a z-index of 2, above its container element that has z-index 1. This allows for the container element to have whatever text and style wanted, and the upload button to be invisible above it (so that when a user clicks on the container element, they actually click the upload button). The main downside to this hack is that the container element will not receive any hover styles (as the user is actually hovering on the upload button), e.g. a pointer cursor.
- Deploying to Heroku: Since one cannot SSH into Heroku to run LTLMoP's custom
setup.py
(which does not use standard protocol, and therefore cannot be chained withpip
via the requirements file), there are 3 lines inapplication.py
that are run on initial start of the app in order to compile LTLMoP's JTLV compiler.