Merge remote-tracking branch 'server/gwt' into gwt

This commit is contained in:
Axel Uhl committed 2012-01-09 16:24:19 +01:00
commit 513ff4798d
3 files changed
+13 -42

No files matched your search

@@ -61,7 +61,7 @@ public class ImageRotator {
* If the platform supports the {@link Canvas} element, returns a view rotated by <code>degrees</code> degrees. Otherwise,
* the {@link #getUnrotatedImageURL() unrotated image's URL} is returned.
*/
public String getRotatedImageURL(double angleInDegrees) {
public String getRotatedImageURL(double angleInDegrees, double scaleFactor) {
String result = getUnrotatedImageURL();
if (canvas != null) {
if (imageElement != null) {
@@ -70,6 +70,7 @@ public class ImageRotator {
context.save();
context.translate(canvasRadius, canvasRadius);
context.rotate(angleInRadians);
context.scale(scaleFactor, scaleFactor);
context.drawImage(imageElement, -imageWidth/2, -imageHeight/2);
result = canvas.toDataUrl("image/png");
context.restore();
@@ -802,6 +802,7 @@ public class RaceMapPanel extends FormPanel implements EventDisplayer, TimeListe
if (newBounds != null) {
map.setZoomLevel(map.getBoundsZoomLevel(newBounds));
map.setCenter(newBounds.getCenter());
map.checkResizeAndCenter();
mapFirstZoomDone = true;
/*
* Reset the mapZoomedOrPannedSinceLastRaceSelection: In spite of the fact that the map was just zoomed
@@ -891,7 +892,16 @@ public class RaceMapPanel extends FormPanel implements EventDisplayer, TimeListe
}
private String getBoatImageURL(ImageRotator boatImageRotator, GPSFixDAO boatFix) {
return boatImageRotator.getRotatedImageURL(boatFix.speedWithBearing.bearingInDegrees);
// the possible zoom level range is 0 to 21 (zoom level 0 would show the whole world)
int zoomLevel = map.getZoomLevel();
double minScaleFactor = 0.1;
double maxScaleFactor = 1.0;
double scaleDiffPerZoomLevel = (maxScaleFactor - minScaleFactor) / 21.0;
double scaleFactor = minScaleFactor + scaleDiffPerZoomLevel * zoomLevel;
return boatImageRotator.getRotatedImageURL(boatFix.speedWithBearing.bearingInDegrees, scaleFactor);
}
private Icon getBoatImageIcon(GPSFixDAO boatFix, boolean highlighted) {
-40
View File
@@ -15,46 +15,6 @@
<nonProxyHosts>localhost|*.sap.corp</nonProxyHosts>
</proxy>
</proxies>
<profiles>
<profile>
<id>snapshot.build</id>
<pluginRepositories>
<pluginRepository>
<id>build.snapshots</id>
<url>http://nexus.wdf.sap.corp:8081/nexus/content/groups/build.snapshots/</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<layout>p2</layout>
<id>eclipse</id>
<url>http://download.eclipse.org/releases/indigo/</url>
</repository>
<repository>
<id>build.snapshots</id>
<url>http://nexus.wdf.sap.corp:8081/nexus/content/groups/build.snapshots/</url>
</repository>
</repositories>
</profile>
</profiles>
<!-- definition of mirrors (by default the public repository of the Nexus server) -->
<!-- -->
<mirrors>
<mirror>
<id>leandi.nexus.mirror</id>
<url>http://nexus.wdf.sap.corp:8081/nexus/content/groups/build.snapshots/</url>
<mirrorOf>*,!build.snapshots,!build.milestones,!sonar</mirrorOf>
</mirror>
</mirrors>
<!-- -->
</settings>