Skip to content

Commit

Permalink
Merge pull request #12550 from zhiyuc123/customBrushStyle
Browse files Browse the repository at this point in the history
feat(dataZoom): custom brush style in toolbox.feature.dataZoom
  • Loading branch information
pissang committed Aug 4, 2020
2 parents 0d471fa + f571331 commit 2e8961b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/component/toolbox/feature/DataZoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ DataZoom.defaultOption = {
back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26'
},
// `zoom`, `back`
title: zrUtil.clone(dataZoomLang.title)
title: zrUtil.clone(dataZoomLang.title),
brushStyle: {
borderWidth: 0,
color: 'rgba(0,0,0,0.2)'
}
};

var proto = DataZoom.prototype;
Expand Down Expand Up @@ -236,11 +240,7 @@ function updateZoomBtnStatus(featureModel, ecModel, view, payload, api) {
zoomActive
? {
brushType: 'auto',
brushStyle: {
// FIXME user customized?
lineWidth: 0,
fill: 'rgba(0,0,0,0.2)'
}
brushStyle: featureModel.getModel('brushStyle').getItemStyle()
}
: false
);
Expand Down
8 changes: 7 additions & 1 deletion test/dataZoom-toolbox.html

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

0 comments on commit 2e8961b

Please sign in to comment.