Login  Register

pinch to zoom on Windows 8 tablets

Posted by Jon Harman-3 on Aug 19, 2014; 5:41pm
URL: http://imagej.273.s1.nabble.com/pinch-to-zoom-on-Windows-8-tablets-tp5009271.html

Hi,
Pinch to zoom on Windows 8 tablets works in a window opened by my
plugin, but not in a normal ImageJ window.  After a little searching I
found that this code (written years ago) in my custom window extension
of ImageWindow causes it to work:

@Override
public void mouseWheelMoved(MouseWheelEvent event) {
        synchronized (this) {
                int rotation = event.getWheelRotation();
                        if (rotation < 0)
                                IJ.run("In");
                        else
                                IJ.run("Out");
        }
}

It might be nice to include this in the ImageJ ImageWindow class.

Jon

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html