-
-
Notifications
You must be signed in to change notification settings - Fork 69
/
viewer2d.html
43 lines (41 loc) · 1.45 KB
/
viewer2d.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Viewer 2D - SLAcer.js (bêta)</title>
<style>
html, body, #slice {
border: 0;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
body {
background-color: #000000;
}
#slice {
background-position: center;
background-repeat: no-repeat;
}
</style>
</head>
<body>
<div id="slice"></div>
<script src="vendor/lodash.min.js" type="text/javascript"></script>
<script src="js/slacer/settings.js" type="text/javascript"></script>
<script>
function storageListener() {
var settings = new SLAcer.Settings();
var dataURL = settings.get('slice.dataURL', 'none');
var image = dataURL !== 'none' ? 'url(' + dataURL + ')' : 'none';
var slice = document.getElementById('slice');
slice.style.backgroundImage = image;
}
window.addEventListener('storage', storageListener, false);
</script>
</body>
</html>