(print = false)
| 680 | } |
| 681 | |
| 682 | async updateDecorators(print = false) { |
| 683 | if (this.autoLayout) { |
| 684 | const axisViews = await Promise.all(this.axis_views.views); |
| 685 | ['top', 'bottom', 'left', 'right'].forEach((side) => { |
| 686 | this.decorators[side] = []; |
| 687 | }); |
| 688 | axisViews.forEach((view) => { |
| 689 | this.decorators[(<Axis>(<unknown>view)).model.get('side')].push(view); |
| 690 | }); |
| 691 | // for the title we use a proxy with the same interface |
| 692 | this.decorators.top.push({ |
| 693 | calculateAutoSize: () => |
| 694 | this.title ? this.title.node().getBBox().height : 0, |
| 695 | setAutoOffset: (padding) => this.title.attr('y', padding), |
| 696 | }); |
| 697 | this.debouncedRelayout(); |
| 698 | } |
| 699 | } |
| 700 | |
| 701 | async add_axis(model: AxisModel) { |
| 702 | // Called when an axis is added to the axes list. |
no test coverage detected