Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
<groupId>sc.fiji</groupId>
<artifactId>bigdataviewer-core</artifactId>
</dependency>
<dependency>
<groupId>sc.fiji</groupId>
<artifactId>bigdataviewer-vistools</artifactId>
</dependency>
<dependency>
<groupId>sc.fiji</groupId>
<artifactId>bigdataviewer_fiji</artifactId>
Expand All @@ -68,6 +64,10 @@
<groupId>net.imglib2</groupId>
<artifactId>imglib2</artifactId>
</dependency>
<dependency>
<groupId>net.imglib2</groupId>
<artifactId>imglib2-cache</artifactId>
</dependency>
<dependency>
<groupId>net.imglib2</groupId>
<artifactId>imglib2-roi</artifactId>
Expand Down Expand Up @@ -186,6 +186,10 @@

<mastodon-graph.version>1.0.0-beta-30</mastodon-graph.version>

<bigdataviewer-core.version>10.6.6</bigdataviewer-core.version>
<imglib2.version>8.0.0</imglib2.version>
<imglib2-cache.version>1.0.0-beta-20</imglib2-cache.version>

<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public int getHeight()
final MyTarget target = new MyTarget();
final MultiResolutionRenderer renderer = new MultiResolutionRenderer(
target, () -> {}, new double[] { 1 }, 0, 1, null, false,
viewer.getOptionValues().getAccumulateProjectorFactory(), new CacheControl.Dummy() );
new CacheControl.Dummy() );

// Mastodon overlays.
if ( tracksOverlay != null )
Expand Down Expand Up @@ -314,7 +314,7 @@ public int getHeight()
final MyTarget target = new MyTarget();
final MultiResolutionRenderer renderer = new MultiResolutionRenderer(
target, () -> {}, new double[] { 1 }, 0, 1, null, false,
viewer.getOptionValues().getAccumulateProjectorFactory(), new CacheControl.Dummy() );
new CacheControl.Dummy() );

// Mastodon overlays.
if ( tracksOverlay != null )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ public class OverlayNavigation< V extends OverlayVertex< V, E >, E extends Overl

private NavigationBehaviour< V, E > navigationBehaviour;

private long lastNavigationTime = 0;

private static final int ANIMATION_DURATION = 300;

public OverlayNavigation(
final AbstractViewerPanel panel,
final OverlayGraph< V, E > graph )
Expand Down Expand Up @@ -86,9 +82,6 @@ public void setNavigationEtiquette( final NavigationEtiquette navigationEtiquett
@Override
public void navigateToVertex( final V vertex )
{
if (shouldThrottle())
return; // Throttle navigation requests.

// Always move in T.
final int tp = vertex.getTimepoint();
panel.state().setCurrentTimepoint( tp );
Expand All @@ -97,20 +90,15 @@ public void navigateToVertex( final V vertex )
final double[] target = navigationBehaviour.navigateToVertex( vertex, currentTransform );
if ( target != null )
{
final TranslationAnimator animator = new TranslationAnimator( currentTransform, target, ANIMATION_DURATION );
lastNavigationTime = System.currentTimeMillis();
animator.setTime( lastNavigationTime );
panel.setTransformAnimator( animator );
final TranslationAnimator animator = new TranslationAnimator( currentTransform, target, 300 );
animator.setTime( System.currentTimeMillis() );
}
panel.requestRepaint();
}

@Override
public void navigateToEdge( final E edge )
{
if ( shouldThrottle() )
return; // Throttle navigation requests.

// Always move in T.
final V ref = graph.vertexRef();
final int tp = edge.getTarget( ref ).getTimepoint();
Expand All @@ -121,21 +109,14 @@ public void navigateToEdge( final E edge )
final double[] target = navigationBehaviour.navigateToEdge( edge, currentTransform );
if ( target != null )
{
final TranslationAnimator animator = new TranslationAnimator( currentTransform, target, ANIMATION_DURATION );
lastNavigationTime = System.currentTimeMillis();
animator.setTime( lastNavigationTime );
final TranslationAnimator animator = new TranslationAnimator( currentTransform, target, 300 );
animator.setTime( System.currentTimeMillis() );
panel.setTransformAnimator( animator );
}

panel.requestRepaint();
}

private boolean shouldThrottle()
{
final long now = System.currentTimeMillis();
return ( now - lastNavigationTime < ANIMATION_DURATION );
}

/*
* Navigation behaviours
*/
Expand Down