-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (60 loc) · 1.74 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Coimbra - Bus Map</title>
<script type="text/javascript" src="js/paperjs-v0.9.25/dist/paper-full.js"></script>
<link rel="stylesheet" type="text/css" href="css/screen.css"/>
<script type="text/paperscript" canvas="map-canvas">
var path;
function onMouseDown(event) {
if (path) {
path.selected = false;
}
path = new Path({
segments: [event.point],
strokeColor: 'black',
strokeWidth: 7
});
}
function onMouseDrag(event) {
path.add(event.point);
}
function onMouseUp(event) {
var segmentCount = path.segments.length;
path.simplify(10);
}
</script>
</head>
<body>
<div class="row">
<div class="col-20 sidebar">
<div class="logo">
<img src="img/bus-map-logo.svg" alt="BUS Map Logo">
</div>
<div class="subtitles">
<img src="img/subtitles.svg" alt="Map Subtitles">
</div>
<div class="reset-map">
<button id="reset" class="btn btn-clear" type="button" name="button">Clear</button>
</div>
</div>
<div class="col-80 map">
<canvas id="map-canvas"></canvas>
</div>
</div>
<a href="javascript:window.print()" class="btn-round">
<img src="img/ic_print_24px.svg" alt="Send Map">
</a>
<script type="text/javascript">
paper.install(window);
window.onload = function () {
paper.setup('map-canvas');
document.getElementById('reset').onclick = function(){
paper.project.activeLayer.removeChildren();
paper.view.draw();
}
};
</script>
</body>
</html>