You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2021/05/13 06:04:47 UTC

[echarts] branch fix/schedule created (now 3f86f91)

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

sushuang pushed a change to branch fix/schedule
in repository https://gitbox.apache.org/repos/asf/echarts.git.


      at 3f86f91  fix: resize throw error. fix #14846, fix #11395 .

This branch includes the following new commits:

     new 3f86f91  fix: resize throw error. fix #14846, fix #11395 .

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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


[echarts] 01/01: fix: resize throw error. fix #14846, fix #11395 .

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch fix/schedule
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 3f86f91ae46b730375ec8823fe72588e92928ab9
Author: 100pah <su...@gmail.com>
AuthorDate: Thu May 13 14:02:59 2021 +0800

    fix: resize throw error. fix #14846, fix #11395 .
---
 src/core/echarts.ts | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/core/echarts.ts b/src/core/echarts.ts
index f9da887..68f764b 100644
--- a/src/core/echarts.ts
+++ b/src/core/echarts.ts
@@ -1160,13 +1160,23 @@ class ECharts extends Eventful<ECEventDefinition> {
             return;
         }
 
-        const optionChanged = ecModel.resetOption('media');
+        let needPrepare = ecModel.resetOption('media');
 
-        const silent = opts && opts.silent;
+        let silent = opts && opts.silent;
+
+        // There is some real cases that:
+        // chart.setOption(option, { lazyUpdate: true });
+        // chart.resize();
+        if (this[OPTION_UPDATED_KEY]) {
+            silent = silent || (this[OPTION_UPDATED_KEY] as any).silent;
+            needPrepare = true;
+            this[OPTION_UPDATED_KEY] = false;
+        }
 
         this[IN_MAIN_PROCESS_KEY] = true;
 
-        optionChanged && prepare(this);
+        needPrepare && prepare(this);
+
         updateMethods.update.call(this, {
             type: 'resize',
             animation: zrUtil.extend({

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