diff --git a/src/ucar/visad/display/DisplayMaster.java b/src/ucar/visad/display/DisplayMaster.java index 6825662ed..5d1fa5d1b 100644 --- a/src/ucar/visad/display/DisplayMaster.java +++ b/src/ucar/visad/display/DisplayMaster.java @@ -62,10 +62,7 @@ import java.rmi.RemoteException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; +import java.util.*; import javax.swing.BoxLayout; import javax.swing.JPanel; @@ -1304,8 +1301,8 @@ protected void handleMouseWheelMoved(java.awt.event.MouseWheelEvent e) { * 2.0 and .5 seems to work well. */ public void zoom(double factor) { - double factorZ = 1.0 + (factor - 1.0) * (myAspect[2]/myAspect[0]); - zoom(factor, factor, factorZ); + //double factorZ = 1.0 + (factor - 1.0) * (myAspect[2]/myAspect[0]); + zoom(factor, factor, factor); } @@ -1328,7 +1325,13 @@ public void zoom(double xfactor, double yfactor, double zfactor) { double[] currentMatrix = getProjectionMatrix(); scaleMatrix = getMouseBehavior().multiply_matrix(scaleMatrix, currentMatrix); + double[] trans = { 0.0, 0.0, 0.0 }; + double[] rot = { 0.0, 0.0, 0.0 }; + double[] scale = { 0.0, 0.0, 0.0 }; + getMouseBehavior().instance_unmake_matrix(rot, scale, trans, + scaleMatrix); + resetClipDistance( scale[0]); try { setProjectionMatrix(scaleMatrix); // setProjectionMatrix(xscaleMatrix); @@ -1338,6 +1341,9 @@ public void zoom(double xfactor, double yfactor, double zfactor) { } + public void resetClipDistance(double scale){ + + } /** * Get the scaling factor for probes and such. The scaling is