Closed ChristianLieven closed 6 years ago
This is another facet of issue #27
With some relative simple javascript code you can add the drag and drop support.
element.on('drop', function(e) {
e.preventDefault();
e.stopPropagation();
var file = e.dataTransfer.files[0];
readData(file); // Function in which you would read the SBML model file
});
In the readData
function you can define a FileReader
, read the text file and parse it with if necessary.
You have to look out for the 'dragover' and 'dragenter' attributes for the element.on
function, you might need to apply the same preventDefault()
and stopPropagation()
functions.
We are exploring this now. Current progress happening here:
What could be of great interest to reach a larger public is perhaps integration with FAIRDOM? https://www.fairdomhub.org/ they have a SEEK interface in which models can be shared, versioning etc, and have some modules included for running models. A model validator would be a great addition I think...
In collaboration with @zakandrewking, we'd like to offer a 'drag&drop' (upload a model, click a "test" button and then see the results as html page) service to execute the memote snapshot report hosted on the BiGG models website.