<!--! Visualizer Connectivity Matrix -->

<div id="s-connectivity">
	<script type="text/javascript" src="{{ deploy_context | safe }}/static/jquery/jquery.mousewheel.js"></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static/jquery/jquery.contextmenu.js" ></script>
	<script type="text/javascript" src="{{ deploy_context | safe }}/static/js/sylvester.js"></script>
	<script type="text/javascript" src="{{ deploy_context | safe }}/static/js/glUtils.js"></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static/js/zoom.js" ></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static_view/commons/shading/shading.js"></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static/js/webGL_ShaderAndMatrixes.js?{{ currentVersionJS }}" ></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static/js/webGL_Mouse.js?{{ currentVersionJS }}"></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static/js/webGL_Pick.js?{{ currentVersionJS }}"></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static/js/webGL_Connectivity.js?{{ currentVersionJS }}"></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static_view/connectivity/scripts/connectivityScript.js?{{ currentVersionJS }}" ></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static_view/connectivity/scripts/connectivityGlobals.js?{{ currentVersionJS }}" ></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static_view/commons/scripts/regionSelector.js?{{ currentVersionJS }}"></script>
    <script type="text/javascript" src="{{ deploy_context | safe }}/static/coloring/colorSchemeComponent.js?{{ currentVersionJS }}"></script>


    {% include 'visualizers/connectivity/connectivity_view.html' %}
    {% import 'visualizers/connectivity/connectivity_view.html' as cv with context %}
	{{ cv.drawConnectivityViewer(false) }}
    <br/>

    <script type="text/javascript">
        $(document).ready(function() {
            {#Need this to pass JSON parsing later in JS#}
            {% if urlVertices is undefined %}
                {% set urlVertices='""' %}
            {% endif %}

            prepareConnectivity('{{ urlWeights }}', '{{ urlTracts }}', '{{ urlPositions | safe }}', '{{ urlVertices | safe }}', '{{ urlTriangles | safe }}',
                                '{{ urlNormals | safe }}', '{{ urlLabels | safe }}', true, '{{ conductionSpeed }}');
        });
    </script>

</div>
