danielePala / CIMDraw

CIMDraw is a WebApp to view IEC CIM (CGMES) files
https://danielepala.github.io/CIMDraw/
GNU General Public License v3.0
19 stars 6 forks source link

URL scheme "file" is not supported. #10

Open goors opened 3 years ago

goors commented 3 years ago

Geting URL scheme "file" is not supported. when trying to upload file. I know that in fact is Browser limitation for fetch. One other thing, how can i use this without minified version of cimdraw?

danielePala commented 3 years ago

Yes, as you say this is related to how browsers handle the "file" scheme and I don't see a workaround, I suggest you use a local web server instead. About the second question, right now in package.json there is only one build script which minifies the code, probably it would be good to define another script (like "build-dev" or similar) which doesn't perform minification.

goors commented 3 years ago

Thanks for the update.

What about using this without minification? What is the order of files that I have to import to index.html from js dir? So project can run either like that or on some port like http://localhost:3000 or similar?

danielePala commented 3 years ago

Supposing you will compile the riot tags under js/tmp, a possible import sequence should be like this:

    <script src="js/D3/d3.min.js"></script>
    <script src="js/bootstrap/bootstrap.bundle.min.js"></script>
    <script src="js/d3-context-menu/d3-context-menu.js"></script>
    <script src="js/riot/riot.min.js"></script>
    <script src="js/riot/route.standalone.js"></script>
    <script src="js/riot/observable.js"></script>
    <script src="js/fflate/fflate.min.js"></script>
    <script src="js/tmp/cimTopologyProcessor.js"></script>
    <script src="js/tmp/cimDiagramControls.js"></script>
    <script src="js/tmp/cimDiagram.js"></script>
    <script src="js/tmp/cimTree.js"></script>
    <script src="js/tmp/cimDraw.js"></script>
    <script src="js/schema.js"></script>
    <script src="js/model.js"></script>
    <script src="js/topology.js"></script>
    <script src="js/matpower.js"></script>
    <script src="js/diagramUtils.js"></script>