MCPcopy Create free account
hub / github.com/bqplot/bqplot / calculateAutoSize

Method calculateAutoSize

js/src/Axis.ts:1014–1028  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1012 }
1013
1014 calculateAutoSize() {
1015 // if offset is used, we don't take up any auto layout space
1016 if (this.offset_value !== undefined) {
1017 return 0;
1018 } else {
1019 const box = this.getBBox();
1020 const side = this.model.get('side');
1021 if (side == 'left' || side == 'right') {
1022 return box.width;
1023 }
1024 if (side == 'bottom' || side == 'top') {
1025 return box.height;
1026 }
1027 }
1028 }
1029
1030 getBBox(): DOMRect {
1031 // To get the bounding box, we don't want to include the gridlines, so we disable them

Callers 1

getFigureSizeMethod · 0.45

Calls 1

getBBoxMethod · 0.95

Tested by

no test coverage detected