Skip to content

Commit 65f6255

Browse files
authored
Merge pull request #20161 from apache/perf/line-memory-cost
perf(line): reduce runtime memory cost
2 parents c9ac641 + 86db174 commit 65f6255

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/chart/line/LineView.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,8 @@ class LineView extends ChartView {
624624

625625
this._symbolDraw = symbolDraw;
626626
this._lineGroup = lineGroup;
627+
628+
this._changePolyState = zrUtil.bind(this._changePolyState, this);
627629
}
628630

629631
render(seriesModel: LineSeriesModel, ecModel: GlobalModel, api: ExtensionAPI) {
@@ -885,9 +887,7 @@ class LineView extends ChartView {
885887
toggleHoverEmphasis(polygon, focus, blurScope, emphasisDisabled);
886888
}
887889

888-
const changePolyState = (toState: DisplayState) => {
889-
this._changePolyState(toState);
890-
};
890+
const changePolyState = this._changePolyState;
891891

892892
data.eachItemGraphicEl(function (el) {
893893
// Switch polyline / polygon state if element changed its state.

0 commit comments

Comments
 (0)