Merge remote-tracking branch

'origin/GP-3249_ryanmkurtz_PR-5156_tomnelson_jar' (Closes #5156)
This commit is contained in:
ghidra1 2023-04-04 15:11:59 -04:00
commit 75a185aa9e
3 changed files with 9 additions and 16 deletions

View file

@ -1,7 +1,7 @@
EXCLUDE FROM GHIDRA JAR: true
MODULE FILE LICENSE: lib/jungrapht-visualization-1.3.jar BSD-3-JUNG
MODULE FILE LICENSE: lib/jungrapht-layout-1.3.jar BSD-3-JUNG
MODULE FILE LICENSE: lib/jungrapht-visualization-1.4.jar BSD-3-JUNG
MODULE FILE LICENSE: lib/jungrapht-layout-1.4.jar BSD-3-JUNG
MODULE FILE LICENSE: lib/jgrapht-core-1.5.1.jar LGPL 2.1
MODULE FILE LICENSE: lib/jgrapht-io-1.5.1.jar LGPL 2.1
MODULE FILE LICENSE: lib/jheaps-0.13.jar Apache License 2.0

View file

@ -27,8 +27,8 @@ dependencies {
api project(":Base")
// jungrapht - exclude slf4j which produces a conflict with other uses with Ghidra
api ("com.github.tomnelson:jungrapht-visualization:1.3") { exclude group: "org.slf4j", module: "slf4j-api" }
api ("com.github.tomnelson:jungrapht-layout:1.3") { exclude group: "org.slf4j", module: "slf4j-api" }
api ("com.github.tomnelson:jungrapht-visualization:1.4") { exclude group: "org.slf4j", module: "slf4j-api" }
api ("com.github.tomnelson:jungrapht-layout:1.4") { exclude group: "org.slf4j", module: "slf4j-api" }
api "org.jgrapht:jgrapht-core:1.5.1"

View file

@ -250,17 +250,6 @@ public class DefaultGraphDisplay implements GraphDisplay {
private LensSupport<LensGraphMouse> createMagnifier() {
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) {
// 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().getTransformer(VIEW);
@ -270,7 +259,11 @@ public class DefaultGraphDisplay implements GraphDisplay {
.delegate(transformer)
.build();
LensGraphMouse lensGraphMouse =
DefaultLensGraphMouse.builder().magnificationPlugin(magnificationPlugin).build();
DefaultLensGraphMouse.builder()
.magnificationFloor(1.f)
.magnificationCeiling(60.f)
.magnificationDelta(.2f)
.build();
return MagnifyImageLensSupport.builder(viewer)
.lensTransformer(shapeTransformer)
.lensGraphMouse(lensGraphMouse)