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
|
<!doctype html>
<meta charset="utf-8">
<title>{{ slide_filename }}</title>
<style type="text/css">
html {
overflow: hidden;
}
body {
margin: 0;
padding: 0;
}
div#view {
position: absolute;
left: 0;
width: 100%;
height: 100%;
background-color: black;
color: white;
}
</style>
<div id="view"></div>
<script type="text/javascript" src="{{ url_for('static', filename='jquery.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='openseadragon.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='openseadragon-scalebar.js') }}"></script>
<script type="text/javascript">
$(function() {
var viewer = new OpenSeadragon({
id: "view",
tileSources: "{{ slide_url }}",
prefixUrl: "{{ url_for('static', filename='images/') }}",
showNavigator: true,
showRotationControl: true,
animationTime: 0.5,
blendTime: 0.1,
constrainDuringPan: true,
maxZoomPixelRatio: 2,
minZoomImageRatio: 1,
visibilityRatio: 1,
zoomPerScroll: 2,
timeout: 120000,
});
var mpp = parseFloat("{{ slide_mpp }}");
viewer.scalebar({
pixelsPerMeter: mpp ? (1e6 / mpp) : 0,
xOffset: 10,
yOffset: 10,
barThickness: 3,
color: '#555555',
fontColor: '#333333',
backgroundColor: 'rgba(255, 255, 255, 0.5)',
});
});
</script>
|