cuijian-dexter commented on issue #8793: 图例名字过长,使用翻页滚动会导致按钮点击无效
URL: 
https://github.com/apache/incubator-echarts/issues/8793#issuecomment-410168098
 
 
   @Ovilia 
这个地方源码确实不太好看,_pageGo这个函数,我不知道为什么每次翻页的时候都要走两遍。。还没有进行仔细研读。目前先解决的办法是把_pageGo函数内容改成如下:
                   var scrollData = this._getPageInfo(legendModel);
                   if(scrollData.pagePrevDataIndex === 
scrollData.pageNextDataIndex) {
                       if (to === 'pagePrevDataIndex') {
                           scrollData.pagePrevDataIndex --;
                       }else{
                           scrollData.pageNextDataIndex ++;
                       }
                   }
                   var scrollDataIndex = scrollData[to];
   
                   scrollDataIndex != null && api.dispatchAction({
                       type: 'legendScroll',
                       scrollDataIndex: scrollDataIndex,
                       legendId: legendModel.id
                   });
   在翻页的时候,如果两个相同的话,就移一个。暂时可以保证可以分页,但不能完全解决问题。

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to