Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug #11000 Type of legend form scroll to plain #11504

Merged
merged 2 commits into from Oct 30, 2019

Conversation

yufeng04
Copy link
Contributor

@yufeng04 yufeng04 commented Oct 29, 2019

Instanceof can not only judge the direct constructor of the instance object, but also judge all the constructors in the prototype chain. The componentModel of scroll legend and the componentModel of plain legend both are instance of ComponentModelClass, so a new componentModel will not be created. The dataZoom also has this problem.

@@ -212,7 +212,7 @@ var GlobalModel = Model.extend({
mainType, resultItem.keyInfo.subType, true
);

if (componentModel && componentModel instanceof ComponentModelClass) {
if (componentModel && componentModel.constructor === ComponentModelClass.constructor) {
Copy link
Contributor

@pissang pissang Oct 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be componentModel.constructor === ComponentModelClass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants