Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions public/example_templates/netjsonmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@
document.body.appendChild(legends);

map.render();
// Todo: Romove before merge
window.map = map
</script>
</body>
</html>
13 changes: 13 additions & 0 deletions src/js/netjsongraph.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,19 @@ class NetJSONGraphUtil {
},
};
}

moveNodeInRealTime(self, id, location) {
const dataIndex = series.data.findIndex(d => d.node.id === id);
const node = self.data.nodes[dataIndex]
const options = self.echarts.getOption()
const series = options.series.find(s => s.type === 'effectScatter');
node.location = location
node.properties.location = location
series.data[dataIndex].value = [location.lng, location.lat];
self.echarts.setOption({
series: options.series
});
}
}

export default NetJSONGraphUtil;
Loading