(
position: number[],
iconName: ControlName,
onclick: () => void,
willRotate?: boolean
)
| 541 | ); |
| 542 | |
| 543 | function makeBtn( |
| 544 | position: number[], |
| 545 | iconName: ControlName, |
| 546 | onclick: () => void, |
| 547 | willRotate?: boolean |
| 548 | ) { |
| 549 | if (!position) { |
| 550 | return; |
| 551 | } |
| 552 | const iconSize = parsePercent( |
| 553 | retrieve2(timelineModel.get(['controlStyle', iconName + 'BtnSize' as any]), controlSize), |
| 554 | controlSize |
| 555 | ); |
| 556 | const rect = [0, -iconSize / 2, iconSize, iconSize]; |
| 557 | const btn = makeControlIcon(timelineModel, iconName + 'Icon' as ControlIconName, rect, { |
| 558 | x: position[0], |
| 559 | y: position[1], |
| 560 | originX: controlSize / 2, |
| 561 | originY: 0, |
| 562 | rotation: willRotate ? -rotation : 0, |
| 563 | rectHover: true, |
| 564 | style: itemStyle, |
| 565 | onclick: onclick |
| 566 | }); |
| 567 | btn.ensureState('emphasis').style = hoverStyle; |
| 568 | group.add(btn); |
| 569 | enableHoverEmphasis(btn); |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | private _renderCurrentPointer( |
nothing calls this directly
no test coverage detected