Skip to content

[5.0] The state of toolbox will be changed to normal after the series leaves emphasis. #13417

@plainheart

Description

@plainheart

Version

The current next branch

Steps to reproduce

Any cases with toolbox.
For example, test/toolbox-stack-custom.html

What is actually happening?

The state of the toolbox component was changed to normal.

unexpected

What is expected?

The emphasis state of the toolbox component should be kept.

expected

Others

I looked around and found it might be caused by the following code.
https://github.com/apache/incubator-echarts/blob/next/src/util/states.ts#L367-L378

According to the PR #12925, I think the blur state is supported in all series. But is it also supported in all components?
If not, perhaps we should only traverse the series and exclude the components like toolbox, axis etc..

Proposed changes

// Before
// model.eachComponent(function (componentType, componentModel) {
//     const view = componentType === 'series'
//         ? ecIns.getViewOfSeriesModel(componentModel as SeriesModel)
//         : ecIns.getViewOfComponentModel(componentModel);
//     // Leave blur anyway
//     view.group.traverse(function (child) {
//         singleLeaveBlur(child);
//     });
// });

// After
model.eachSeries(function (seriesModel) {
    const view = ecIns.getViewOfSeriesModel(seriesModel);
    // Leave blur anyway
    view.group.traverse(function (child) {
        singleLeaveBlur(child);
    });
});

I'm not sure, these are only my simple thoughts.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in English

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions