[PATCH] SupraRegionalTable final review

Wald Commits scm-commit at wald.intevation.org
Wed Jul 11 10:20:02 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1531297193 -7200
# Node ID 2ea7b61797d34eceab5658269be5a265d93cd372
# Parent  cbe393451ab038c8f42e0c99bb31147d4aad710d
SupraRegionalTable final review

diff -r cbe393451ab0 -r 2ea7b61797d3 artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixZone.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixZone.java	Tue Jul 10 18:53:04 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixZone.java	Wed Jul 11 10:19:53 2018 +0200
@@ -134,14 +134,14 @@
         final double otherLower = otherZone.getLowerFromTo();
         final double otherUpper = otherZone.getUpperFromTo();
 
-        final double upper = getUpperFromTo() - DELTA;
-        final double lower = getLowerFromTo() + DELTA;
+        final double upper = getUpperFromTo();
+        final double lower = getLowerFromTo();
         final double otherSchwerpunkt = (otherLower + otherUpper) / 2;
         if ((otherUpper < upper && otherUpper > lower)) {
             return true;
         } else if (otherLower > lower && otherLower < upper) {
             return true;
-        } else if (otherSchwerpunkt > lower && otherSchwerpunkt < upper) {
+        } else if (otherSchwerpunkt > (lower - DELTA) && otherSchwerpunkt < (upper + DELTA)) {
             return true;
         }
         return false;
@@ -164,16 +164,13 @@
         if (differenceAbs > DELTA) {
             return false;
         }
-
         return true;
     }
 
     private static double getAnschluss(final List<SalixZone> list, final double minKm) {
-
         if (list.size() > 0) {
             return list.get(list.size() - 1).getUpperFromTo();
         }
         return minKm;
     }
-
 }
diff -r cbe393451ab0 -r 2ea7b61797d3 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java	Tue Jul 10 18:53:04 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java	Wed Jul 11 10:19:53 2018 +0200
@@ -160,7 +160,7 @@
         final DynamicForm newEntryForm = new DynamicForm();
         newEntryForm.setWidth(320);
         newEntryForm.setNumCols(12);
-        newEntryForm.setFields(dwspl, start, end);
+        newEntryForm.setFields(start, end, dwspl);
 
         add.addClickHandler(new ClickHandler() {
             @Override
@@ -249,7 +249,7 @@
         final Label title = new Label(data.get(0).getDescription());
         title.setHeight("35px");
         this.validationLabel.setHeight("10px");
-
+        this.validationLabel.getElement().getStyle().setColor("red");
         final ListGrid elements = new ListGrid();
         elements.setWidth(320);
         elements.setHeight(300);
@@ -288,7 +288,7 @@
                 }
             }
         });
-        elements.setFields(dmwsplField, fromField, toField, removeField);
+        elements.setFields(fromField, toField, dmwsplField, removeField);
         addDataInit(elements, tableData);
 
         root.addMember(title);
diff -r cbe393451ab0 -r 2ea7b61797d3 gwt-client/src/main/java/org/dive4elements/river/client/shared/model/SalixZone.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/SalixZone.java	Tue Jul 10 18:53:04 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/SalixZone.java	Wed Jul 11 10:19:53 2018 +0200
@@ -135,14 +135,14 @@
         final double otherLower = otherZone.getLowerFromTo();
         final double otherUpper = otherZone.getUpperFromTo();
 
-        final double upper = getUpperFromTo() - DELTA;
-        final double lower = getLowerFromTo() + DELTA;
+        final double upper = getUpperFromTo();
+        final double lower = getLowerFromTo();
         final double otherSchwerpunkt = (otherLower + otherUpper) / 2;
         if ((otherUpper < upper && otherUpper > lower)) {
             return true;
         } else if (otherLower > lower && otherLower < upper) {
             return true;
-        } else if (otherSchwerpunkt > lower && otherSchwerpunkt < upper) {
+        } else if (otherSchwerpunkt > (lower - DELTA) && otherSchwerpunkt < (upper + DELTA)) {
             return true;
         }
         return false;
@@ -165,16 +165,13 @@
         if (differenceAbs > DELTA) {
             return false;
         }
-
         return true;
     }
 
     private static double getAnschluss(final List<SalixZone> list, final double minKm) {
-
         if (list.size() > 0) {
             return list.get(list.size() - 1).getUpperFromTo();
         }
         return minKm;
     }
-
 }


More information about the Dive4Elements-commits mailing list