mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 22:15:26 +00:00
Bug 4202: Performance Improvement: removed unnecessary onBoundsChanged
call when dragging the map
This commit is contained in:
1 parent
b491626d95
commit
8675b579d6
1 file changed
+7
-7
+7
-7
@@ -700,8 +700,11 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
|
||||
showLayoutsAfterAnimationFinishes();
|
||||
}
|
||||
}
|
||||
// TODO bug489 when in wind-up mode, avoid zooming out too far; perhaps zoom back in if zoomed
|
||||
// out too far
|
||||
|
||||
if ((streamletOverlay != null) && !map.getBounds().equals(currentMapBounds)
|
||||
&& settings.isShowWindStreamletOverlay()) {
|
||||
streamletOverlay.onBoundsChanged(map.getZoom() != currentZoomLevel);
|
||||
}
|
||||
}
|
||||
|
||||
private void showLayoutsAfterAnimationFinishes() {
|
||||
@@ -766,17 +769,14 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
|
||||
if (!isAutoZoomInProgress() && (newZoomLevel != currentZoomLevel)) {
|
||||
removeTransitions();
|
||||
}
|
||||
if ((streamletOverlay != null) && !map.getBounds().equals(currentMapBounds)
|
||||
&& settings.isShowWindStreamletOverlay()) {
|
||||
streamletOverlay.onBoundsChanged(newZoomLevel != currentZoomLevel);
|
||||
}
|
||||
|
||||
currentMapBounds = map.getBounds();
|
||||
currentZoomLevel = newZoomLevel;
|
||||
headerPanel.getElement().getStyle().setWidth(map.getOffsetWidth(), Unit.PX);
|
||||
refreshMapWithoutAnimation();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// If there was a time change before the API was loaded, reset the time
|
||||
if (lastTimeChangeBeforeInitialization != null) {
|
||||
timeChanged(lastTimeChangeBeforeInitialization, null);
|
||||
|
||||
Reference in new issue
Block a user