This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 1fc7bee1 fix(editor): add back missing appEnv.onresize
1fc7bee1 is described below

commit 1fc7bee1ab49f7e1e6dd17ad2aa2cbf4eea2a89e
Author: plainheart <y...@all-my-life.cn>
AuthorDate: Tue May 10 18:05:02 2022 +0800

    fix(editor): add back missing appEnv.onresize
---
 src/editor/sandbox/setup.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/editor/sandbox/setup.js b/src/editor/sandbox/setup.js
index 099091d7..effd87b9 100644
--- a/src/editor/sandbox/setup.js
+++ b/src/editor/sandbox/setup.js
@@ -184,7 +184,10 @@ function setup(isShared) {
             console.error('failed to show debug dirty rect', e);
           }
         }
-        window.addEventListener('resize', chartInstance.resize);
+        window.addEventListener('resize', () => {
+          chartInstance.resize();
+          echarts.util.isFunction(appEnv.onresize) && appEnv.onresize();
+        });
         wrapChartMethods(chartInstance);
       }
 


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

Reply via email to