You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/06/21 02:27:20 UTC

[echarts] branch enhance-morph updated (17cde38 -> e9d124c)

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

shenyi pushed a change to branch enhance-morph
in repository https://gitbox.apache.org/repos/asf/echarts.git.


    from 17cde38  test(ut): add recorded user interections
     new 8d50187  test(ut): fixed animiation update duration
     new e9d124c  fix(custom): fix decal not work in custom series

The 2 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.


Summary of changes:
 src/chart/custom/CustomView.ts                 | 19 +++++++++----------
 test/runTest/actions/universalTransition.json  |  2 +-
 test/runTest/actions/universalTransition2.json |  2 +-
 test/runTest/actions/universalTransition3.json |  2 +-
 test/runTest/runtime/main.js                   |  5 -----
 test/universalTransition.html                  |  3 +--
 test/universalTransition2.html                 |  3 +--
 test/universalTransition3.html                 |  3 +--
 8 files changed, 15 insertions(+), 24 deletions(-)

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


[echarts] 01/02: test(ut): fixed animiation update duration

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

shenyi pushed a commit to branch enhance-morph
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 8d501874db155d0698051feb63d620604339ba9e
Author: pissang <bm...@gmail.com>
AuthorDate: Sun Jun 20 22:58:12 2021 +0800

    test(ut): fixed animiation update duration
---
 test/runTest/actions/universalTransition.json  | 2 +-
 test/runTest/actions/universalTransition2.json | 2 +-
 test/runTest/actions/universalTransition3.json | 2 +-
 test/runTest/runtime/main.js                   | 5 -----
 test/universalTransition.html                  | 3 +--
 test/universalTransition2.html                 | 3 +--
 test/universalTransition3.html                 | 3 +--
 7 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/test/runTest/actions/universalTransition.json b/test/runTest/actions/universalTransition.json
index dcb94f3..4895c55 100644
--- a/test/runTest/actions/universalTransition.json
+++ b/test/runTest/actions/universalTransition.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousedown","time":610,"x":14,"y":77},{"type":"mouseup","time":737,"x":14,"y":77},{"time":738,"delay":200,"type":"screenshot-auto"},{"type":"mousemove","time":1116,"x":14,"y":77},{"type":"mousemove","time":1316,"x":53,"y":76},{"type":"mousemove","time":1521,"x":70,"y":76},{"type":"mousedown","time":2141,"x":70,"y":76},{"type":"mouseup","time":2207,"x":70,"y":76},{"time":2208,"delay":200,"type":"screenshot-auto"},{"type":"mousemove","time":3750,"x":71,"y [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":610,"x":14,"y":77},{"type":"mouseup","time":737,"x":14,"y":77},{"time":738,"delay":100,"type":"screenshot-auto"},{"type":"mousemove","time":1116,"x":14,"y":77},{"type":"mousemove","time":1316,"x":53,"y":76},{"type":"mousemove","time":1521,"x":70,"y":76},{"type":"mousedown","time":2141,"x":70,"y":76},{"type":"mouseup","time":2207,"x":70,"y":76},{"time":2208,"delay":100,"type":"screenshot-auto"},{"type":"mousemove","time":3750,"x":71,"y [...]
\ No newline at end of file
diff --git a/test/runTest/actions/universalTransition2.json b/test/runTest/actions/universalTransition2.json
index 4308c94..cdc7262 100644
--- a/test/runTest/actions/universalTransition2.json
+++ b/test/runTest/actions/universalTransition2.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousedown","time":472,"x":221,"y":267},{"type":"mouseup","time":561,"x":221,"y":267},{"time":562,"delay":200,"type":"screenshot-auto"},{"type":"mousemove","time":1020,"x":220,"y":266},{"type":"mousemove","time":1220,"x":72,"y":121},{"type":"mousemove","time":1420,"x":65,"y":106},{"type":"mousemove","time":1625,"x":68,"y":90},{"type":"mousemove","time":1855,"x":68,"y":90},{"type":"mousedown","time":2046,"x":68,"y":90},{"type":"mouseup","time":2124,"x":6 [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":472,"x":221,"y":267},{"type":"mouseup","time":561,"x":221,"y":267},{"time":562,"delay":100,"type":"screenshot-auto"},{"type":"mousemove","time":1020,"x":220,"y":266},{"type":"mousemove","time":1220,"x":72,"y":121},{"type":"mousemove","time":1420,"x":65,"y":106},{"type":"mousemove","time":1625,"x":68,"y":90},{"type":"mousemove","time":1855,"x":68,"y":90},{"type":"mousedown","time":2046,"x":68,"y":90},{"type":"mouseup","time":2124,"x":6 [...]
\ No newline at end of file
diff --git a/test/runTest/actions/universalTransition3.json b/test/runTest/actions/universalTransition3.json
index 2d669f6..35192e8 100644
--- a/test/runTest/actions/universalTransition3.json
+++ b/test/runTest/actions/universalTransition3.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousemove","time":502,"x":120,"y":93},{"type":"mousemove","time":703,"x":122,"y":85},{"type":"mousemove","time":918,"x":122,"y":84},{"type":"mousedown","time":955,"x":122,"y":84},{"type":"mouseup","time":1040,"x":122,"y":84},{"time":1041,"delay":200,"type":"screenshot-auto"},{"type":"mousemove","time":2351,"x":122,"y":84},{"type":"mousemove","time":2551,"x":163,"y":79},{"type":"mousemove","time":2753,"x":267,"y":75},{"type":"mousemove","time":2960,"x": [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousemove","time":502,"x":120,"y":93},{"type":"mousemove","time":703,"x":122,"y":85},{"type":"mousemove","time":918,"x":122,"y":84},{"type":"mousedown","time":955,"x":122,"y":84},{"type":"mouseup","time":1040,"x":122,"y":84},{"time":1041,"delay":100,"type":"screenshot-auto"},{"type":"mousemove","time":2351,"x":122,"y":84},{"type":"mousemove","time":2551,"x":163,"y":79},{"type":"mousemove","time":2753,"x":267,"y":75},{"type":"mousemove","time":2960,"x": [...]
\ No newline at end of file
diff --git a/test/runTest/runtime/main.js b/test/runTest/runtime/main.js
index b400ed0..633911d 100644
--- a/test/runTest/runtime/main.js
+++ b/test/runTest/runtime/main.js
@@ -111,11 +111,6 @@ window.__VRT_RUN_ACTIONS__ = async function (actions, restoredActionIndex, resto
     __VRT_FINISH_ACTIONS__();
 }
 
-// INJECT SOME GLOBAL VARIABLES
-// Use A LARGER DURATION THAT VRT CAN CATCH intermediate state.
-window.__VRT_RECOMMAND_ANIMATION_DURATION__ = 1500;
-
-
 
 window.addEventListener('DOMContentLoaded', () => {
     let style = document.createElement('style');
diff --git a/test/universalTransition.html b/test/universalTransition.html
index b6da610..78e12b3 100644
--- a/test/universalTransition.html
+++ b/test/universalTransition.html
@@ -45,8 +45,7 @@ under the License.
 
 
         <script>
-            window.ANIMATION_DURATION_UPDATE = window.__VRT_RECOMMAND_ANIMATION_DURATION__
-                ? window.__VRT_RECOMMAND_ANIMATION_DURATION__ : 1000;
+            window.ANIMATION_DURATION_UPDATE = 1000;
         </script>
 
 
diff --git a/test/universalTransition2.html b/test/universalTransition2.html
index f24daf6..1b3a7cc 100644
--- a/test/universalTransition2.html
+++ b/test/universalTransition2.html
@@ -43,8 +43,7 @@ under the License.
 
 
         <script>
-            window.ANIMATION_DURATION_UPDATE = window.__VRT_RECOMMAND_ANIMATION_DURATION__
-                ? window.__VRT_RECOMMAND_ANIMATION_DURATION__ : 1000;
+            window.ANIMATION_DURATION_UPDATE = 1000;
         </script>
 
 
diff --git a/test/universalTransition3.html b/test/universalTransition3.html
index 9cd4860..fb4b2a5 100644
--- a/test/universalTransition3.html
+++ b/test/universalTransition3.html
@@ -41,8 +41,7 @@ under the License.
         <div id="main0"></div>
 
         <script>
-            window.ANIMATION_DURATION_UPDATE = window.__VRT_RECOMMAND_ANIMATION_DURATION__
-                ? window.__VRT_RECOMMAND_ANIMATION_DURATION__ : 1000;
+            window.ANIMATION_DURATION_UPDATE = 1000;
         </script>
 
 

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


[echarts] 02/02: fix(custom): fix decal not work in custom series

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

shenyi pushed a commit to branch enhance-morph
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit e9d124cc67ca172263c02dd575161d274b10d4bf
Author: pissang <bm...@gmail.com>
AuthorDate: Sun Jun 20 23:23:06 2021 +0800

    fix(custom): fix decal not work in custom series
---
 src/chart/custom/CustomView.ts | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/chart/custom/CustomView.ts b/src/chart/custom/CustomView.ts
index 961a9ec..cd896e8 100644
--- a/src/chart/custom/CustomView.ts
+++ b/src/chart/custom/CustomView.ts
@@ -509,19 +509,13 @@ function applyPropsDirectly(
 
     if (elDisplayable && styleOpt) {
 
-        const decalPattern = (styleOpt as CustomZRPathOption['style']).__decalPattern;
-        let originalDecalObj;
-        if (decalPattern) {
-            originalDecalObj = (styleOpt as CustomZRPathOption['style']).decal;
-            (styleOpt as any).decal = decalPattern;
-        }
-
         // PENDING: here the input style object is used directly.
         // Good for performance but bad for compatibility control.
         elDisplayable.useStyle(styleOpt);
 
+        const decalPattern = (styleOpt as CustomZRPathOption['style']).__decalPattern;
         if (decalPattern) {
-            (styleOpt as CustomZRPathOption['style']).decal = originalDecalObj;
+            elDisplayable.style.decal = decalPattern;
         }
 
         // When style object changed, how to trade the existing animation?
@@ -548,8 +542,13 @@ function applyPropsDirectly(
         }
     }
 
-    // Set el to the final state firstly.
-    allPropsFinal && el.attr(allPropsFinal);
+    if (allPropsFinal) {
+        // Not set style here.
+        (allPropsFinal as DisplayableProps).style = null;
+        // Set el to the final state firstly.
+        allPropsFinal && el.attr(allPropsFinal);
+        (allPropsFinal as DisplayableProps).style = styleOpt;
+    }
 }
 
 function applyPropsTransition(

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