Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgilbers committed Aug 21, 2024
1 parent e55208a commit 65138fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions drawio/indoor-navigation.drawio
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<mxfile host="65bd71144e">
<diagram id="jrNGx-gabtCFgvl1K_JJ" name="Klassendiagramm">
<mxGraphModel dx="1056" dy="1386" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<mxGraphModel dx="1908" dy="1832" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
Expand Down Expand Up @@ -239,7 +239,7 @@
</mxGraphModel>
</diagram>
<diagram id="EIwWNi0Rns-KdU61ulC4" name="Funktionen">
<mxGraphModel dx="1371" dy="1225" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<mxGraphModel dx="1885" dy="1290" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
Expand Down
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="./css/style.css">
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>

<script src="https://unpkg.com/html5-qrcode" type="text/javascript"></script>
</head>

Expand Down Expand Up @@ -149,7 +148,7 @@ <h4>Gyroscope</h4>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="./js/map.js"></script>
<script src="./js/map.js" type="module"></script>
<script src="./js/sensor.js"></script>
</body>

Expand Down
8 changes: 5 additions & 3 deletions js/map.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict'

import 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.js'

// Graph Variables
let nodeA = null
let nodeB = null
Expand Down Expand Up @@ -137,7 +139,7 @@ function clickOnEdge (e) {
}
}

function createJSON () {
window.createJSON = function () {
const json = JSON.stringify(nodes)
const link = document.getElementById('downloadlink')
link.href = makeTextFile(json)
Expand Down Expand Up @@ -261,12 +263,12 @@ const graphUI = document.getElementsByClassName('graphUI')
// Click Event der Map deaktivieren, damit keine Marker gesetzt werden wenn man auf den Button drückt
download.addEventListener('click', function (e) { e.stopPropagation() })

function closeMenu () {
window.closeMenu = function () {
const bsOffcanvas = bootstrap.Offcanvas.getInstance('#offcanvasMenu')
bsOffcanvas.hide()
}

function activateGraphUI () {
window.activateGraphUI = function () {
toggleGraphUI.checked && loadJSON() // Graphdaten laden
if (!toggleGraphUI.checked) {
nodes.splice(0, nodes.length)
Expand Down

0 comments on commit 65138fc

Please sign in to comment.