Skip to content

Commit

Permalink
chore: rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
susiwen8 committed Oct 17, 2021
1 parent ff7d7c0 commit c803311
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/chart/line/LineSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption<CallbackD

data?: (LineDataValue | LineDataItemOption)[]

enableLineEvent?: boolean
triggerLineEvent?: boolean
}

class LineSeriesModel extends SeriesModel<LineSeriesOption> {
Expand Down Expand Up @@ -216,7 +216,7 @@ class LineSeriesModel extends SeriesModel<LineSeriesOption> {
divideShape: 'clone'
},

enableLineEvent: false,
triggerLineEvent: false,
};

getLegendIcon(opt: LegendIconParams): ECSymbol | Group {
Expand Down
8 changes: 4 additions & 4 deletions src/chart/line/LineView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,13 +880,13 @@ class LineView extends ChartView {
this._step = step;
this._valueOrigin = valueOrigin;

if (seriesModel.get('enableLineEvent')) {
this._mouseEvent(seriesModel, polyline);
polygon && this._mouseEvent(seriesModel, polygon);
if (seriesModel.get('triggerLineEvent')) {
this.packEventData(seriesModel, polyline);
polygon && this.packEventData(seriesModel, polygon);
}
}

private _mouseEvent(seriesModel: LineSeriesModel, el: Element) {
private packEventData(seriesModel: LineSeriesModel, el: Element) {
getECData(el).eventData = {
componentType: 'series',
componentSubType: 'line',
Expand Down
2 changes: 1 addition & 1 deletion test/polyline-gon-event.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c803311

Please sign in to comment.