Skip to content

Commit e8238a2

Browse files
fix: opacity level while data point selection
-feat: added the multiple selection without use of prolong mouse down event
1 parent 6f305b4 commit e8238a2

File tree

3 files changed

+120
-5
lines changed

3 files changed

+120
-5
lines changed

src/component/brush/BrushModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class BrushModel extends ComponentModel<BrushOption> {
136136
static defaultOption: BrushOption = {
137137
seriesIndex: 'all',
138138
brushType: 'rect',
139-
brushMode: 'single',
139+
brushMode: 'multiple',
140140
transformable: true,
141141
brushStyle: {
142142
borderWidth: 1,

src/component/toolbox/feature/Brush.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class BrushFeature extends ToolboxFeature<ToolboxBrushFeatureOption> {
5454

5555
ecModel.eachComponent({mainType: 'brush'}, function (brushModel: BrushModel) {
5656
brushType = brushModel.brushType;
57-
brushMode = brushModel.brushOption.brushMode || 'single';
57+
brushMode = brushModel.brushOption.brushMode || 'multiple';
5858
isBrushed = isBrushed || !!brushModel.areas.length;
5959
});
6060
this._brushType = brushType;
@@ -120,9 +120,7 @@ class BrushFeature extends ToolboxFeature<ToolboxBrushFeatureOption> {
120120
brushType: type === 'keep'
121121
? brushType
122122
: (brushType === type ? false : type),
123-
brushMode: type === 'keep'
124-
? (brushMode === 'multiple' ? 'single' : 'multiple')
125-
: brushMode
123+
brushMode: 'multiple'
126124
}
127125
});
128126
}

test/brush-feature-test.html

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)