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

Method compute_view_padding

js/src/Pie.ts:602–616  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

600 }
601
602 compute_view_padding() {
603 const scales = this.model.getScales();
604 const r = d3.max([
605 this.model.get('radius'),
606 this.model.get('inner_radius'),
607 ]);
608
609 const xPadding = scales.x ? r + 1 : 0;
610 const yPadding = scales.y ? r + 1 : 0;
611 if (xPadding !== this.xPadding || yPadding !== this.yPadding) {
612 this.xPadding = xPadding;
613 this.yPadding = yPadding;
614 this.trigger('mark_padding_updated');
615 }
616 }
617
618 private d3Pie: d3.Pie<any, Slice>;
619 // private pieSelection: d3.Selection<SVGGElement, Slice, any, any>;

Callers 2

renderMethod · 0.95
create_listenersMethod · 0.95

Calls 1

getScalesMethod · 0.45

Tested by

no test coverage detected