-
-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Remove this code:
openwisp-monitoring/openwisp_monitoring/device/static/monitoring/js/device-map.js
Lines 360 to 391 in 6f6fd7e
| // When panning west past the dateline, clone features shifted −360° | |
| if (bounds._southWest.lng < -180 && !netjsonGraph.westWorldFeaturesAppended) { | |
| const westWorld = structuredClone(netjsonGraph.data); | |
| westWorld.features = westWorld.features.filter( | |
| (f) => !f.geometry || f.geometry.coordinates[0] <= 180, | |
| ); | |
| westWorld.features.forEach((f) => { | |
| if (f.geometry) { | |
| f.geometry.coordinates[0] -= 360; | |
| } | |
| }); | |
| netjsonGraph.utils.appendData(westWorld, netjsonGraph); | |
| netjsonGraph.westWorldFeaturesAppended = true; | |
| } | |
| // When panning east past the dateline, clone features shifted +360° | |
| if (bounds._northEast.lng > 180 && !netjsonGraph.eastWorldFeaturesAppended) { | |
| const eastWorld = structuredClone(netjsonGraph.data); | |
| eastWorld.features = eastWorld.features.filter( | |
| (f) => !f.geometry || f.geometry.coordinates[0] >= -180, | |
| ); | |
| eastWorld.features.forEach((f) => { | |
| if (f.geometry) { | |
| f.geometry.coordinates[0] += 360; | |
| } | |
| }); | |
| netjsonGraph.utils.appendData(eastWorld, netjsonGraph); | |
| netjsonGraph.eastWorldFeaturesAppended = true; | |
| } | |
| }); | |
| }, | |
| }); |
In favour of openwisp/netjsongraph.js#466 (needs to be merged first)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog