()
| 547 | } |
| 548 | |
| 549 | private _renderHandle() { |
| 550 | const thisGroup = this.group; |
| 551 | const displayables = this._displayables; |
| 552 | const handles: [graphic.Path, graphic.Path] = displayables.handles = [null, null]; |
| 553 | const handleLabels: [graphic.Text, graphic.Text] = displayables.handleLabels = [null, null]; |
| 554 | const sliderGroup = this._displayables.sliderGroup; |
| 555 | const size = this._size; |
| 556 | const dataZoomModel = this.dataZoomModel; |
| 557 | const api = this.api; |
| 558 | |
| 559 | const borderRadius = dataZoomModel.get('borderRadius') || 0; |
| 560 | |
| 561 | const brushSelect = dataZoomModel.get('brushSelect'); |
| 562 | |
| 563 | const filler = displayables.filler = new Rect({ |
| 564 | silent: brushSelect, |
| 565 | style: { |
| 566 | fill: dataZoomModel.get('fillerColor') |
| 567 | }, |
| 568 | textConfig: { |
| 569 | position: 'inside' |
| 570 | } |
| 571 | }); |
| 572 | |
| 573 | sliderGroup.add(filler); |
| 574 | |
| 575 | // Frame border. |
| 576 | sliderGroup.add(new Rect({ |
| 577 | silent: true, |
| 578 | subPixelOptimize: true, |
| 579 | shape: { |
| 580 | x: 0, |
| 581 | y: 0, |
| 582 | width: size[0], |
| 583 | height: size[1], |
| 584 | r: borderRadius |
| 585 | }, |
| 586 | style: { |
| 587 | // deprecated option |
| 588 | stroke: dataZoomModel.get('dataBackgroundColor' as any) |
| 589 | || dataZoomModel.get('borderColor'), |
| 590 | lineWidth: DEFAULT_FRAME_BORDER_WIDTH, |
| 591 | fill: tokens.color.transparent |
| 592 | } |
| 593 | })); |
| 594 | |
| 595 | // Left and right handle to resize |
| 596 | each([0, 1] as const, function (handleIndex) { |
| 597 | let iconStr = dataZoomModel.get('handleIcon'); |
| 598 | if ( |
| 599 | !symbolBuildProxies[iconStr] |
| 600 | && iconStr.indexOf('path://') < 0 |
| 601 | && iconStr.indexOf('image://') < 0 |
| 602 | ) { |
| 603 | // Compatitable with the old icon parsers. Which can use a path string without path:// |
| 604 | iconStr = 'path://' + iconStr; |
| 605 | if (__DEV__) { |
| 606 | deprecateLog('handleIcon now needs \'path://\' prefix when using a path string'); |
no test coverage detected