Changeset 18263 in josm for trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
- Timestamp:
- 2021-10-09T20:42:32+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
r18246 r18263 32 32 import org.openstreetmap.josm.data.preferences.IntegerProperty; 33 33 import org.openstreetmap.josm.gui.MainApplication; 34 import org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable; 34 35 import org.openstreetmap.josm.gui.layer.geoimage.viewers.projections.IImageViewer; 35 36 import org.openstreetmap.josm.gui.layer.geoimage.viewers.projections.ImageProjectionRegistry; … … 37 38 import org.openstreetmap.josm.gui.layer.imagery.ImageryFilterSettings.FilterChangeListener; 38 39 import org.openstreetmap.josm.gui.util.GuiHelper; 40 import org.openstreetmap.josm.gui.util.imagery.Vector3D; 39 41 import org.openstreetmap.josm.spi.preferences.Config; 40 42 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; … … 510 512 } 511 513 } 512 // We have to update the mousePointInImg for 360 image panning, as otherwise the panning 513 // never stops. 514 // We have to update the mousePointInImg for 360 image panning, as otherwise the panning never stops. 514 515 // This does not work well with the perspective viewer at this time (2021-08-26). 515 if (entry != null && Projections.EQUIRECTANGULAR == entry.getProjectionType()) { 516 boolean is360panning = entry != null && Projections.EQUIRECTANGULAR == entry.getProjectionType(); 517 if (is360panning) { 516 518 this.mousePointInImg = p; 517 519 } 518 520 ImageDisplay.this.repaint(); 521 if (is360panning) { 522 // repaint direction arrow 523 MainApplication.getLayerManager().getLayersOfType(GeoImageLayer.class).forEach(AbstractMapViewPaintable::invalidate); 524 } 519 525 } 520 526 … … 983 989 984 990 /** 991 * Get the rotation in the image viewer for an entry 992 * @param entry The entry to get the rotation for. May be {@code null}. 993 * @return the current rotation in the image viewer, or {@code null} 994 * @since 18263 995 */ 996 public Vector3D getRotation(IImageEntry<?> entry) { 997 return entry != null ? getIImageViewer(entry).getRotation() : null; 998 } 999 1000 /** 985 1001 * Ensure that a rectangle isn't zoomed in too much 986 1002 * @param rectangle The rectangle to get (typically the visible area)
Note:
See TracChangeset
for help on using the changeset viewer.