GP-1181 override to address bug with high resolution mouse wheel

(Closes #3281, Closes #3284)
This commit is contained in:
tom
2021-07-30 09:37:45 -04:00
committed by ghidra1
parent 7f2ef251e1
commit 8ec719d449

View File

@@ -297,7 +297,16 @@ public class DefaultGraphDisplay implements GraphDisplay {
Lens lens = Lens.builder().lensShape(Lens.Shape.RECTANGLE).magnification(3.f).build();
lens.setMagnification(2.f);
LensMagnificationGraphMousePlugin magnificationPlugin =
new LensMagnificationGraphMousePlugin(1.f, 60.f, .2f);
new LensMagnificationGraphMousePlugin(1.f, 60.f, .2f) {
// Override to address a bug when using a high resolution mouse wheel.
// May be removed when jungrapht-visualization version is updated
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
if (e.getWheelRotation() != 0) {
super.mouseWheelMoved(e);
}
}
};
MutableTransformer transformer = viewer.getRenderContext()
.getMultiLayerTransformer()