You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.8 KiB
62 lines
1.8 KiB
5 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="de" dir="ltr">
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<title>Assignment</title>
|
||
|
<link rel="stylesheet" href="{{ url_for('static', filename='fonts/roboto.css') }}">
|
||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.min.css') }}">
|
||
|
<script src="https://unpkg.com/konva@4.0.7/konva.min.js"></script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<main>
|
||
|
<div id="infobar">You have to select at least 2 nodes</div>
|
||
|
<div id="canvas" class="canvas"></div>
|
||
|
<nav>
|
||
|
<button type="button" onclick="create_node()">
|
||
|
<img src="{{ url_for('static', filename='imgs/plus.svg') }}">
|
||
|
<h1>Create</h1>
|
||
|
</button>
|
||
|
<button type="button" onclick="create_edge()">
|
||
|
<img src="{{ url_for('static', filename='imgs/drawing.svg') }}">
|
||
|
<h1>Connect</h1>
|
||
|
</button>
|
||
|
<button type="button" onclick="find_path()">
|
||
|
<img src="{{ url_for('static', filename='imgs/share.svg') }}">
|
||
|
<h1>Find Path</h1>
|
||
|
</button>
|
||
|
</nav>
|
||
|
<footer>
|
||
|
<button type="button" data-activeon="auto_layout" onclick="toggle_auto_layout()">
|
||
|
<h1>Automatic Layout</h1>
|
||
|
</button>
|
||
|
</footer>
|
||
|
</main>
|
||
|
<script>
|
||
|
var nodes = ["Aachen", "Berlin", "Chemnitz", "Dresden", "Essen"]
|
||
|
var edges = [{
|
||
|
"start": "Aachen",
|
||
|
"end": "Berlin",
|
||
|
"weight": 800
|
||
|
},{
|
||
|
"start": "Dresden",
|
||
|
"end": "Berlin",
|
||
|
"weight": 800
|
||
|
},{
|
||
|
"start": "Essen",
|
||
|
"end": "Berlin",
|
||
|
"weight": 800
|
||
|
}, {
|
||
|
"start": "Chemnitz",
|
||
|
"end": "Dresden",
|
||
|
"weight": 5
|
||
|
},
|
||
|
{
|
||
|
"start": "Chemnitz",
|
||
|
"end": "Berlin",
|
||
|
"weight": 5
|
||
|
}]
|
||
|
</script>
|
||
|
<script src="{{ url_for('static', filename='js/canvas.js')}}"></script>
|
||
|
</body>
|
||
|
</html>
|