25 lines
648 B
HTML
25 lines
648 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<script src="../dist/svg-pan-zoom.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>Demo for svg-pan-zoom: SVG in HTML 'object' element</h1>
|
|
<object id="demo-tiger" type="image/svg+xml" data="tiger.svg" style="width: 500px; height: 500px; border:1px solid black; ">Your browser does not support SVG</object>
|
|
|
|
<script>
|
|
// Don't use window.onLoad like this in production, because it can only listen to one function.
|
|
window.onload = function() {
|
|
svgPanZoom('#demo-tiger', {
|
|
zoomEnabled: true,
|
|
controlIconsEnabled: true
|
|
});
|
|
};
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|