You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/10/12 09:38:35 UTC

[GitHub] ayufish edited a comment on issue #7860: 3d 地图,chart.on( 'click', function... ) ,点击地图无反应

ayufish edited a comment on issue #7860: 3d 地图,chart.on( 'click', function... ) ,点击地图无反应
URL: https://github.com/apache/incubator-echarts/issues/7860#issuecomment-429260304
 
 
   我的版本4.1.0,中国地图,单击事件无效,鼠标双击或者悬浮都能触发
   update:
   查看源代码
   ```js
   else if (name === 'click') {
               if (this._downEl !== this._upEl
                   // Original click event is triggered on the whole canvas element,
                   // including the case that `mousedown` - `mousemove` - `mouseup`,
                   // which should be filtered, otherwise it will bring trouble to
                   // pan and zoom.
                   || !this._downPoint
                   // Arbitrary value
                   || dist(this._downPoint, [event.zrX, event.zrY]) > 4
               ) {
                   return;
               }
               this._downPoint = null;
           }
   ```
   第二个或判断为true,点击被拦截,删掉后两个或判断后单击事件正常

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org