You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 252b3ea
Browse filesBrowse the repository at this point in the historyBrowse files
fix!: Use double instead of float in map API (#4567)
* fix!: Use double instead of float in map API
Java numbers like 1.2 are by default doubles and having floats in the API only makes it harder to use
* adapt remaining code to use double
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
Copy file name to clipboardExpand all lines: vaadin-map-flow-parent/vaadin-map-flow-integration-tests/src/main/java/com/vaadin/flow/component/map/MarkerFeaturePage.java
Copy file name to clipboardExpand all lines: vaadin-map-flow-parent/vaadin-map-flow-integration-tests/src/test/java/com/vaadin/flow/components/map/MapEventsIT.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -40,8 +40,8 @@ public void changeViewPort_viewStateUpdated() {
40
40
String[] parts = viewStateDiv.getText().split(";");
41
41
doublecenterX = Double.parseDouble(parts[0]);
42
42
doublecenterY = Double.parseDouble(parts[1]);
43
-
floatrotation = Float.parseFloat(parts[2]);
44
-
floatzoom = Float.parseFloat(parts[3]);
43
+
doublerotation = Double.parseDouble(parts[2]);
44
+
doublezoom = Double.parseDouble(parts[3]);
45
45
46
46
Assert.assertEquals(43.5627725, centerX, 0.1);
47
47
Assert.assertEquals(44.1428164, centerY, 0.1);
@@ -63,8 +63,8 @@ public void changeViewPort_correctEventDataReceived() {
63
63
String[] parts = eventDataDiv.getText().split(";");
Copy file name to clipboardExpand all lines: vaadin-map-flow-parent/vaadin-map-flow/src/main/java/com/vaadin/flow/component/map/configuration/AbstractConfigurationObject.java
Copy file name to clipboardExpand all lines: vaadin-map-flow-parent/vaadin-map-flow/src/main/java/com/vaadin/flow/component/map/configuration/View.java
Copy file name to clipboardExpand all lines: vaadin-map-flow-parent/vaadin-map-flow/src/main/java/com/vaadin/flow/component/map/configuration/layer/Layer.java
Copy file name to clipboardExpand all lines: vaadin-map-flow-parent/vaadin-map-flow/src/main/java/com/vaadin/flow/component/map/configuration/source/ImageWMSSource.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ public class ImageWMSSource extends ImageSource {
22
22
privatefinalMap<String, Object> params;
23
23
privatefinalStringserverType;
24
24
privatefinalStringcrossOrigin;
25
-
privatefinalfloatratio;
25
+
privatefinaldoubleratio;
26
26
27
27
publicImageWMSSource(Optionsoptions) {
28
28
super(options);
@@ -116,7 +116,7 @@ public String getCrossOrigin() {
116
116
*
117
117
* @return the ratio
118
118
*/
119
-
publicfloatgetRatio() {
119
+
publicdoublegetRatio() {
120
120
returnratio;
121
121
}
122
122
@@ -125,7 +125,7 @@ public static class Options extends ImageSource.Options {
125
125
privateMap<String, Object> params;
126
126
privateStringserverType;
127
127
privateStringcrossOrigin;
128
-
privatefloatratio = 1.5f;
128
+
privatedoubleratio = 1.5;
129
129
130
130
/**
131
131
* @see ImageWMSSource#getUrl()
@@ -158,7 +158,7 @@ public void setCrossOrigin(String crossOrigin) {
Copy file name to clipboardExpand all lines: vaadin-map-flow-parent/vaadin-map-flow/src/main/java/com/vaadin/flow/component/map/configuration/style/Icon.java
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -216,21 +216,21 @@ public void setImgSize(ImageSize imgSize) {
Copy file name to clipboardExpand all lines: vaadin-map-flow-parent/vaadin-map-flow/src/main/java/com/vaadin/flow/component/map/configuration/style/ImageStyle.java
0 commit comments