Skip to content

Commit a3af60f

Browse files
committed
remove polygons for 1.7.10
1 parent 1b1a938 commit a3af60f

File tree

4 files changed

+1
-54
lines changed

4 files changed

+1
-54
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
release=0.9-SNAPSHOT
1+
release=0.8-SNAPSHOT

src/main/js/api.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const URLS = {
2222
DATA: "/data/{type}",
2323
LOGS: "/logs",
2424
PROPERTIES: "/properties",
25-
POLYGONS: "/polygons",
2625
RESOURCES: "/resources?resource={resource}",
2726
SKIN: "/skin/{uuid}",
2827
STATUS: "/status",
@@ -91,8 +90,6 @@ export async function getAllData(imagesSince) {
9190
data.players = await getData(DATA_TYPES.PLAYERS)
9291
data.villagers = await getData(DATA_TYPES.VILLAGERS)
9392

94-
data.polygons = await getPolygons()
95-
9693
return data
9794
}
9895

@@ -108,9 +105,6 @@ export async function setProperties(properties) {
108105
return json(URLS.PROPERTIES, POST, properties)
109106
}
110107

111-
export async function getPolygons() {
112-
return json(URLS.POLYGONS, GET)
113-
}
114108

115109
export function getResourceUrl(resource) {
116110
return URLS.RESOURCES.format({ resource: encodeURIComponent(resource) })

src/main/js/datastore.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export default {
3030
undergroundIcon: undergroundIcon,
3131

3232
markers: [],
33-
polygons: [],
3433
tiles: {},
3534
waypoints: [],
3635

@@ -62,7 +61,6 @@ export default {
6261
visiblePlayers: true,
6362
visibleVillagers: true,
6463

65-
visiblePolygons: true,
6664
visibleWaypoints: true,
6765

6866
JMTileLayer: JMTileLayer,

src/main/js/journeymap.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ class Journeymap {
165165
this.lastTileCheck = now
166166

167167
datastore.state.markers = this._buildMarkers(data)
168-
datastore.state.polygons = this._buildPolygons(data)
169168
datastore.state.waypoints = this._buildWaypoints(data)
170169

171170
this.player_x = data.player.posX
@@ -342,50 +341,6 @@ class Journeymap {
342341
return markers
343342
}
344343

345-
_buildPolygons(data) {
346-
const polygons = []
347-
348-
if (! datastore.state.visiblePolygons) {
349-
return polygons
350-
}
351-
352-
for (const polygon of Object.values(data.polygons)) {
353-
let coords = []
354-
const holes = []
355-
356-
for (const point of Object.values(polygon.points)) {
357-
coords.push(translateCoords(point.x, point.z))
358-
}
359-
360-
if (polygon.holes.size > 0) {
361-
for (const holeObj of Object.values(polygon.holes)) {
362-
const hole = []
363-
364-
for (const point of Object.values(holeObj)) {
365-
hole.push(translateCoords(point.x, point.z))
366-
}
367-
368-
holes.push(hole)
369-
}
370-
371-
coords = coords.concat([coords], holes)
372-
}
373-
374-
polygons.push({
375-
latLngs: coords,
376-
377-
strokeColor: polygon.strokeColor,
378-
strokeOpacity: polygon.strokeOpacity,
379-
strokeWidth: polygon.strokeWidth,
380-
381-
fillColor: polygon.fillColor,
382-
fillOpacity: polygon.fillOpacity,
383-
})
384-
}
385-
386-
return polygons
387-
}
388-
389344
_buildWaypoints(data) {
390345
const waypoints = []
391346

0 commit comments

Comments
 (0)