forked from UniversalViewer/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwo-up.html
62 lines (47 loc) · 2.22 KB
/
two-up.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
<html>
<head>
<script type="text/javascript" src="lib/jquery/dist/jquery.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
}
.uv.left{
float: left;
}
.uv.right{
float: right;
}
</style>
</head>
<body>
<div class="uv left" data-locale="en-GB:English (GB),cy-GB:Cymraeg,sv-SE:Svenska" data-config="/examples/two-up-config.json" data-uri="http://wellcomelibrary.org/iiif/collection/b19974760" data-collectionindex="7" data-manifestindex="9" data-sequenceindex="0" data-canvasindex="0" data-zoom="-0.0041,-0.1143,0.5114,0.4018" data-rotation="0" style="width:800px; height:600px; background-color: #000"></div>
<div class="uv right" data-locale="en-GB:English (GB),cy-GB:Cymraeg,sv-SE:Svenska" data-config="/examples/two-up-config.json" data-uri="http://api.bl.uk/metadata/iiif/ark:/81055/vdc_100022545251.0x000002/manifest.json" data-collectionindex="0" data-manifestindex="0" data-sequenceindex="0" data-canvasindex="0" style="width:800px; height:600px; background-color: #000"></div>
<script type="text/javascript" id="embedUV" src="http://universalviewer.io/examples/uv/lib/embed.js"></script><script type="text/javascript">/* wordpress fix */</script>
<!--<script type="text/javascript" id="embedUV" src="http://localhost:8001/src/lib/embed.js"></script><script type="text/javascript">/* wordpress fix */</script>-->
<script>
$(function() {
var isFullSreen = false;
var $leftUV = $('.uv.left');
var $rightUV = $('.uv.right');
window.onresize = function() {
resize();
};
$(document).bind('uv.onToggleFullScreen', function (event, obj) {
isFullSreen = obj.isFullScreen;
});
function resize() {
var windowWidth = window.innerWidth;
var windowHeight = window.innerHeight;
var width = (isFullSreen) ? windowWidth : windowWidth / 2;
$leftUV.width(width);
$leftUV.height(windowHeight);
$rightUV.width(width);
$rightUV.height(windowHeight);
}
resize();
});
</script>
</body>
</html>