MCPcopy Index your code
hub / github.com/bqplot/bqplot / updateDecorators

Method updateDecorators

js/src/Figure.ts:682–699  ·  view source on GitHub ↗
(print = false)

Source from the content-addressed store, hash-verified

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.

Callers 4

initializeMethod · 0.95
renderImplMethod · 0.95
coloraxis.tsFile · 0.80
axis.tsFile · 0.80

Calls 1

getBBoxMethod · 0.80

Tested by

no test coverage detected