fix: 地图拖动/缩放时流量边实时跟随
- moveend事件清空边坐标缓存+立即重绘 - 不每帧重复绑定handler Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2672,6 +2672,7 @@ function loadTrafficData() {
|
|||||||
document.getElementById('saTrafficSlider').value = 0;
|
document.getElementById('saTrafficSlider').value = 0;
|
||||||
document.getElementById('saTrafficInfo').textContent =
|
document.getElementById('saTrafficInfo').textContent =
|
||||||
(d.windows||[]).length + ' 窗口 · ' + Object.keys(d.nodes_coords||{}).length + ' 节点 · 跨度' + ((maxTs-minTs)/60).toFixed(0) + 'min';
|
(d.windows||[]).length + ' 窗口 · ' + Object.keys(d.nodes_coords||{}).length + ' 节点 · 跨度' + ((maxTs-minTs)/60).toFixed(0) + 'min';
|
||||||
|
SA.map.off('moveend.flowCache').on('moveend.flowCache', () => { _trafficEdgeCache = {}; });
|
||||||
document.getElementById('saTrafficTime').textContent = tsToBJ(_trafficCurrentTime);
|
document.getElementById('saTrafficTime').textContent = tsToBJ(_trafficCurrentTime);
|
||||||
trafficStart();
|
trafficStart();
|
||||||
})
|
})
|
||||||
@@ -2847,8 +2848,6 @@ function renderTrafficCrossfade() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
SA.map.off('moveend.flowCache').on('moveend.flowCache', () => { _trafficEdgeCache = {}; });
|
|
||||||
|
|
||||||
if (SA.pointLayer && !SA._clusterFocus) {
|
if (SA.pointLayer && !SA._clusterFocus) {
|
||||||
SA.pointLayer.getLayers().forEach(l => {
|
SA.pointLayer.getLayers().forEach(l => {
|
||||||
if (!l.setStyle) return;
|
if (!l.setStyle) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user