From 27d270e150e7eaf37df7dc0ee91f27d10e2d184b Mon Sep 17 00:00:00 2001 From: make it right <740135965@qq.com> Date: Wed, 30 Oct 2019 14:34:14 +0800 Subject: [PATCH] fix: fix component type can't change bug #11000 * fix bug #11000 * fix bug #11000 --- src/model/Global.js | 2 +- test/dataZoom-extreme.html | 428 +++++++++++++++++++--------------- test/legend-scroll2plain.html | 148 ++++++++++++ 3 files changed, 386 insertions(+), 192 deletions(-) create mode 100644 test/legend-scroll2plain.html diff --git a/src/model/Global.js b/src/model/Global.js index d33fc8522e..dcc9a0b8d0 100644 --- a/src/model/Global.js +++ b/src/model/Global.js @@ -212,7 +212,7 @@ var GlobalModel = Model.extend({ mainType, resultItem.keyInfo.subType, true ); - if (componentModel && componentModel instanceof ComponentModelClass) { + if (componentModel && componentModel.constructor === ComponentModelClass) { componentModel.name = resultItem.keyInfo.name; // componentModel.settingTask && componentModel.settingTask.dirty(); componentModel.mergeOption(newCptOption, this); diff --git a/test/dataZoom-extreme.html b/test/dataZoom-extreme.html index 2372352d36..bf289843b5 100644 --- a/test/dataZoom-extreme.html +++ b/test/dataZoom-extreme.html @@ -20,227 +20,273 @@ - - - - - - - - - - - - - - -
-
-
- - - - + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + }); + - + + - @@ -249,6 +295,6 @@ + - \ No newline at end of file diff --git a/test/legend-scroll2plain.html b/test/legend-scroll2plain.html new file mode 100644 index 0000000000..312afdd7ac --- /dev/null +++ b/test/legend-scroll2plain.html @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + \ No newline at end of file