surui0419 commented on issue #8261: 3d地球上的3d飞线尾迹特效在长时间运行后会静止不动,但2d飞线上的尾迹特效却一直在运动 URL: https://github.com/apache/incubator-echarts/issues/8261#issuecomment-386177478 点击世界地图时,将世界地图上的飞线和特效点数据清空,并且地球停止转动,弹出中国地图。 点击中国地图的容器,让中国地图的消失,并且注销中国地图的echarts实例,再给世界地图的飞线和特效点添加数据,让地球恢复转动。反复进行这种操作会导致地球上的3d飞线尾迹特效静止吗? //点击地球时地球停止转动,中国地图打开 this.globalEchart.getZr().on('click', ()=>{ // 地球停止转动并且光照变暗 this.globalEchart.setOption({ globe:{ viewControl: {// 用于鼠标的旋转缩放控制 zoomSensitivity: 0, // 缩放灵敏度 0关闭缩放 rotateSensitivity: [2,0], //控制横、纵旋转灵敏度 autoRotate: false, // 控制地球是否自转 autoRotateSpeed:0 } } }) this.openChinaMap() }) //打开中国地图时绘制中国地图,并将世界地图上的飞线、点数据清空 openChinaMap () { // 中国地图显示 this.globalEchart.getZr().off('click') //绘制中国地图方法 this.drawChinaMap() // 世界地图边界线变暗 this.worldEchart.setOption({ geo:{ regions: [], itemStyle: {borderColor: "rgba(180, 183, 179, 0.01)"} } }) // 世界地图的飞线消失 this.globalEchart.setOption({series: {data: []}}) // 世界地图上的特效点消失 this.worldEchart.setOption({series: [ { data: []}, { data: []} ]}) }, //点击某容器关闭、销毁中国地图并且让地球边界线恢复亮度、飞仙特效点也都重新加入数据,地球转动 closeChinaMap () { // 中国地图隐藏 var that = this this.isHideChina = true this.isShowChina = false // 世界地图边界线恢复 this.worldEchart.setOption({ geo:{ regions: [ { name: 'South Africa\n南非', label:{ show:true, fontSize:22, color: '#02fd00' }, itemStyle:{ areaColor: 'rgba(0,0,0,0.3)' } }, { name: '上海', label:{ show:true, fontSize:16, color: '#02fd00' }, itemStyle:{ areaColor: 'rgba(0,0,0,0.3)' } }, { name: 'Lao PDR\n老挝', label:{ show:true, fontSize:22, color: '#02fd00' }, itemStyle:{ areaColor: 'rgba(0,0,0,0.3)' } }, { name: 'United State\n美国', label:{ show:true, fontSize:22, color: '#b7c0c9' } } ], itemStyle: {borderColor: "rgba(255, 253, 250, 0.8)"} } }) if(that.chinaEchart && !that.chinaEchart.isDisposed()) { that.chinaEchart.clear() that.chinaEchart.dispose() echarts.registerMap("china", {}) // 世界地图的飞线显示 that.globalEchart.setOption({ series: {data: that.worldLine}}) // 世界地图上的特效点显示 that.worldEchart.setOption({series: [ {data: that.geoCoordMap.slice(0, 21).map((val)=>{ return { name: val.name, value:val.value.concat([val.circleValue]) } })}, {data: that.singleLine} ]}) // setTimeout(()=>{ that.globalEchart.setOption({ globe:{ viewControl: {// 用于鼠标的旋转缩放控制 zoomSensitivity: 0, // 缩放灵敏度 0关闭缩放 rotateSensitivity: [2,0], //控制横、纵旋转灵敏度 autoRotate: true, // 控制地球是否自转 autoRotateDirection: "ccw", //控制自转方向 targetCoord: [105.9526, 22.3017], autoRotateSpeed:10 } } }) // },2000) } setTimeout(()=>{ this.globalEchart.getZr().on('click', ()=>{ // 地球停止转动并且光照变暗 this.globalEchart.setOption({ globe:{ viewControl: {// 用于鼠标的旋转缩放控制 zoomSensitivity: 0, // 缩放灵敏度 0关闭缩放 rotateSensitivity: [2,0], //控制横、纵旋转灵敏度 autoRotate: false, // 控制地球是否自转 autoRotateSpeed:0 } } }) this.openChinaMap() }) },4000) },
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org For additional commands, e-mail: dev-h...@echarts.apache.org