diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2011-11-17 21:22:48 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2011-11-17 21:22:48 (GMT) |
commit | 720d85edd0316e1cedec3402e204ce418174305d (patch) | |
tree | 0c7c3ab3d6f38e212b2cd4a4628e3c9d32d49db3 /src/svgpan_js.h | |
parent | 8491e9fbd06ef8a8f1cc542a524c673d7781d4b6 (diff) | |
download | Doxygen-720d85edd0316e1cedec3402e204ce418174305d.zip Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.gz Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.bz2 |
Release-1.7.5.1-20111117
Diffstat (limited to 'src/svgpan_js.h')
-rw-r--r-- | src/svgpan_js.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/svgpan_js.h b/src/svgpan_js.h index 7cbbdfc..260d4f7 100644 --- a/src/svgpan_js.h +++ b/src/svgpan_js.h @@ -66,7 +66,7 @@ " windowWidth = 800;\n" " windowHeight = 600;\n" " }\n" -" minZoom = Math.min(windowHeight/viewHeight,windowWidth/viewWidth);\n" +" minZoom = Math.min(Math.min(viewHeight,windowHeight)/viewHeight,Math.min(viewWidth,windowWidth)/viewWidth);\n" " maxZoom = minZoom+1.5;\n" " zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps);\n" " zoomOutFactor = 1.0/zoomInFactor;\n" @@ -168,6 +168,7 @@ "function handleMouseWheel(evt) \n" "{\n" " if (!evt) evt = window.evt;\n" +" if (!evt.shiftKey) return; // only zoom when shift is pressed\n" " if (evt.preventDefault) evt.preventDefault();\n" " evt.returnValue = false;\n" "\n" |