Move documentation
This commit is contained in:
23
documentation/frontend/js/svg-pan-zoom.controls.js
Normal file
23
documentation/frontend/js/svg-pan-zoom.controls.js
Normal file
@@ -0,0 +1,23 @@
|
||||
document.getElementById('demo-svg').addEventListener('load', function() {
|
||||
panZoom = svgPanZoom('#demo-svg', {
|
||||
zoomEnabled: true,
|
||||
minZoom: 1,
|
||||
maxZoom: 5
|
||||
});
|
||||
|
||||
document.getElementById('zoom-in').addEventListener('click', function(ev) {
|
||||
ev.preventDefault()
|
||||
panZoom.zoomIn()
|
||||
});
|
||||
|
||||
document.getElementById('zoom-out').addEventListener('click', function(ev) {
|
||||
ev.preventDefault()
|
||||
panZoom.zoomOut()
|
||||
});
|
||||
|
||||
document.getElementById('reset').addEventListener('click', function(ev) {
|
||||
ev.preventDefault()
|
||||
panZoom.resetZoom();
|
||||
panZoom.resetPan();
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user