summaryrefslogtreecommitdiffstats
path: root/src/svgpan.js
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2011-11-17 21:22:48 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2011-11-17 21:22:48 (GMT)
commit720d85edd0316e1cedec3402e204ce418174305d (patch)
tree0c7c3ab3d6f38e212b2cd4a4628e3c9d32d49db3 /src/svgpan.js
parent8491e9fbd06ef8a8f1cc542a524c673d7781d4b6 (diff)
downloadDoxygen-720d85edd0316e1cedec3402e204ce418174305d.zip
Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.gz
Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.bz2
Release-1.7.5.1-20111117
Diffstat (limited to 'src/svgpan.js')
-rw-r--r--src/svgpan.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/svgpan.js b/src/svgpan.js
index 7c0c916..663be79 100644
--- a/src/svgpan.js
+++ b/src/svgpan.js
@@ -66,7 +66,7 @@ function show()
windowWidth = 800;
windowHeight = 600;
}
- minZoom = Math.min(windowHeight/viewHeight,windowWidth/viewWidth);
+ minZoom = Math.min(Math.min(viewHeight,windowHeight)/viewHeight,Math.min(viewWidth,windowWidth)/viewWidth);
maxZoom = minZoom+1.5;
zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps);
zoomOutFactor = 1.0/zoomInFactor;
@@ -168,6 +168,7 @@ function doZoom(g,point,zoomFactor)
function handleMouseWheel(evt)
{
if (!evt) evt = window.evt;
+ if (!evt.shiftKey) return; // only zoom when shift is pressed
if (evt.preventDefault) evt.preventDefault();
evt.returnValue = false;