You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/08/18 08:08:27 UTC

[GitHub] [echarts] YYL1999 opened a new issue #15555: 使用graphic时当窗口resize重新渲染后 绑定在graphic的onclick事件丢失 且cursor: pointer也失效了

YYL1999 opened a new issue #15555:
URL: https://github.com/apache/echarts/issues/15555


   ### Version
   5.0.2
   
   ### Steps to reproduce
   详细代码如下
   ```
   option = {
       graphic: [{
           type: 'group',
           id: 'textGroup1',
           left: 30,
           top: 30,
           bounding: 'raw',
           children: [
               {
                   type: 'rect',
                   z: 100,
                   left: 'center',
                   top: 'center',
                   shape: {
                       width: 330,
                       height: 100
                   },
                   style: {
                       fill: '#fff',
                       stroke: '#999',
                       lineWidth: 2,
                       shadowBlur: 8,
                       shadowOffsetX: 3,
                       shadowOffsetY: 3,
                       shadowColor: 'rgba(0,0,0,0.3)'
                   }
               },
               {
                   type: 'text',
                   z: 100,
                   top: 'middle',
                   left: 'center',
                   style: {
                       text: [
                           '这个文本框的 bounding 为 "raw"',
                           '表示定位时仅仅取 group 自己的',
                           '未经过 transform 的包围盒。'
                       ].join('\n'),
                       font: '20px "STHeiti", sans-serif'
                   }
               }
           ]
       }, {
           type: 'group',
           id: 'textGroup2',
           left: 0,
           bottom: 0,
           children: [
               {
                   type: 'rect',
                   z: 100,
                   left: 'center',
                   top: 'center',
                   shape: {
                       width: 330,
                       height: 100
                   },
                   style: {
                       fill: '#fff',
                       stroke: '#999',
                       lineWidth: 2,
                       shadowBlur: 8,
                       shadowOffsetX: 3,
                       shadowOffsetY: 3,
                       shadowColor: 'rgba(0,0,0,0.3)'
                   }
               },
               {
                   type: 'text',
                   z: 100,
                   top: 'middle',
                   left: 'center',
                   style: {
                       text: [
                           '这个文本框的 bounding 为 "all"',
                           '表示定位时取整个 group 的',
                           '经过 transform 后的包围盒。'
                       ].join('\n'),
                       font: '20px "STHeiti", sans-serif'
                   }
               }
           ]
       }]
   }
   
   var rotation = 0;
   setInterval(function () {
       rotation = (rotation   Math.PI / 300) % (Math.PI * 2);
       myChart.setOption({
           graphic: [{
               id: 'textGroup1',
               rotation: rotation
           }, {
               id: 'textGroup2',
               rotation: rotation
           }]
       });
   }, 20);
   ```
   窗口变动事件失效
   
   ### What is expected?
   失效是有效的
   
   ### What is actually happening?
   事件失效
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] YYL1999 commented on issue #15555: When using a graphic, when the window is resized and re-rendered, the onclick event bound to the graphic is lost and the cursor: pointer is also invalid.

Posted by GitBox <gi...@apache.org>.
YYL1999 commented on issue #15555:
URL: https://github.com/apache/echarts/issues/15555#issuecomment-905109083


   > 没有看到调用 resize,请问“窗口变动事件失效”如何体现?
   
   > 这不是有setInterval调用setOption 首次渲染时OK  再调用就不行了  结果都是一样的 就是首次渲染OK 再调用一次setOptions就不行了


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] echarts-bot[bot] commented on issue #15555: 使用graphic时当窗口resize重新渲染后 绑定在graphic的onclick事件丢失 且cursor: pointer也失效了

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15555:
URL: https://github.com/apache/echarts/issues/15555#issuecomment-900909969






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] echarts-bot[bot] commented on issue #15555: 使用graphic时当窗口resize重新渲染后 绑定在graphic的onclick事件丢失 且cursor: pointer也失效了

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15555:
URL: https://github.com/apache/echarts/issues/15555#issuecomment-900909969






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] YYL1999 commented on issue #15555: When using a graphic, when the window is resized and re-rendered, the onclick event bound to the graphic is lost and the cursor: pointer is also invalid.

Posted by GitBox <gi...@apache.org>.
YYL1999 commented on issue #15555:
URL: https://github.com/apache/echarts/issues/15555#issuecomment-913411705


   有空了瞅瞅这个呗 各位大佬们


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] Ovilia commented on issue #15555: When using a graphic, when the window is resized and re-rendered, the onclick event bound to the graphic is lost and the cursor: pointer is also invalid.

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15555:
URL: https://github.com/apache/echarts/issues/15555#issuecomment-905106611


   没有看到调用 resize,请问“窗口变动事件失效”如何体现?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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