Fix update notice for area markers - missing description
This commit is contained in:
parent
a5d5f1d275
commit
f3e6c81c50
2 changed files with 15 additions and 0 deletions
|
|
@ -272,6 +272,19 @@ class AreaMarkerImpl implements AreaMarker {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void setCornerLocations(double[] x, double[] z) {
|
public void setCornerLocations(double[] x, double[] z) {
|
||||||
|
/* Check if equals */
|
||||||
|
if(x.length == corners.size()) {
|
||||||
|
boolean match = true;
|
||||||
|
for(int i = 0; i < x.length; i++) {
|
||||||
|
Coord c = corners.get(i);
|
||||||
|
if((c.x != x[i]) || (c.z != z[i])) {
|
||||||
|
match = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(match)
|
||||||
|
return;
|
||||||
|
}
|
||||||
corners.clear();
|
corners.clear();
|
||||||
for(int i = 0; (i < x.length) && (i < z.length); i++) {
|
for(int i = 0; (i < x.length) && (i < z.length); i++) {
|
||||||
corners.add(new Coord(x[i], z[i]));
|
corners.add(new Coord(x[i], z[i]));
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||||
public String id;
|
public String id;
|
||||||
public String label;
|
public String label;
|
||||||
public String set;
|
public String set;
|
||||||
|
public String desc;
|
||||||
|
|
||||||
public AreaMarkerUpdated(AreaMarker m, boolean deleted) {
|
public AreaMarkerUpdated(AreaMarker m, boolean deleted) {
|
||||||
this.id = m.getMarkerID();
|
this.id = m.getMarkerID();
|
||||||
|
|
@ -125,6 +126,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||||
opacity = m.getLineOpacity();
|
opacity = m.getLineOpacity();
|
||||||
fillcolor = String.format("#%06X", m.getFillColor());
|
fillcolor = String.format("#%06X", m.getFillColor());
|
||||||
fillopacity = m.getFillOpacity();
|
fillopacity = m.getFillOpacity();
|
||||||
|
desc = m.getDescription();
|
||||||
|
|
||||||
this.set = m.getMarkerSet().getMarkerSetID();
|
this.set = m.getMarkerSet().getMarkerSetID();
|
||||||
if(deleted)
|
if(deleted)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue